Know every vulnerabilitybefore it knows you.
DevGuard continuously monitors your dependencies and alerts you when CVEs like this one affect your stack — with real-time threat intelligence built for developers.
GHSA-2cp6-34r9-54xx
No affected components available
Summary
The makerjs.extendObject function copies properties from source objects without proper validation, potentially exposing applications to security risks. The function lacks hasOwnProperty() checks and does not filter dangerous keys, allowing inherited properties and potentially malicious properties to be copied to target objects.
Details
The extendObject function iterates over source object properties using a for...in loop without:
- Checking
hasOwnProperty()to exclude inherited properties - Filtering dangerous keys (
__proto__,constructor,prototype) - Validating property sources
Affected Code
File: https://github.com/microsoft/maker.js/blob/98cffa82a372ff942194c925a12a311253587167/packages/maker.js/src/core/maker.ts#L232-L241
PoC
const makerjs = require('makerjs');
const source = { __proto__: { name: 'Ravi', isAdmin: true } };
const target = { name: 'user' };
const result = makerjs.extendObject(target, source);
console.log(result.name); // Ravi
console.log(result.isAdmin); // true
Impact
Security Implications
-
Unexpected Behavior: Properties may appear on target objects but not be own properties, breaking
hasOwnProperty()assumptions in security-sensitive code. -
Security Bypass Risk: Code relying on
hasOwnProperty()for validation could be bypassed. -
Future Risk: Lack of dangerous key filtering (
__proto__,constructor,prototype) exposes potential attack vectors.
Affected Use Cases
- Extending objects from user input or external APIs
- Merging options from untrusted sources
The vulnerability can be exploited over the network without needing physical access. It is easy for an attacker to exploit this vulnerability. An attacker does not need any special privileges or access rights. No user interaction is needed for the attacker to exploit this vulnerability. The impact is confined to the system where the vulnerability exists. There is a low impact on the confidentiality of the information. There is a low impact on the integrity of the data.
Exploitation attempts have been detected. Elevated vigilance and prompt remediation are advised.
The exploit probability is very low. The vulnerability is unlikely to be exploited in the next 30 days.
We did not find any exploit available. Neither in GitHub repositories nor in the Exploit-Database.
Browse More
Continuously monitor your dependencies and get alerted when vulnerabilities like this one affect your stack.
Checkout DevGuard