Skip to content

Maker.js has Unsafe Property Copying in makerjs.extendObject

Moderate severity GitHub Reviewed Published Jan 28, 2026 in microsoft/maker.js • Updated Jan 29, 2026

Package

npm makerjs (npm)

Affected versions

<= 0.19.1

Patched versions

0.19.2

Description

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:

  1. Checking hasOwnProperty() to exclude inherited properties
  2. Filtering dangerous keys (__proto__, constructor, prototype)
  3. 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

  1. Unexpected Behavior: Properties may appear on target objects but not be own properties, breaking hasOwnProperty() assumptions in security-sensitive code.

  2. Security Bypass Risk: Code relying on hasOwnProperty() for validation could be bypassed.

  3. 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

References

@danmarshall danmarshall published to microsoft/maker.js Jan 28, 2026
Published by the National Vulnerability Database Jan 28, 2026
Published to the GitHub Advisory Database Jan 29, 2026
Reviewed Jan 29, 2026
Last updated Jan 29, 2026

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

EPSS score

Weaknesses

Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')

The product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. Learn more on MITRE.

CVE ID

CVE-2026-24888

GHSA ID

GHSA-2cp6-34r9-54xx

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.