CVE-2026-24888: Maker.js Unsafe Property Copying Vulnerability
Summary
CVE-2026-24888: Maker.js has Unsafe Property Copying in makerjs.extendObject. Affects makerjs versions < 0.19.2. Fixed in 0.19.2. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Maker.js is a JavaScript library designed for creating and manipulating vector graphics. It provides a range of functionalities for developers to work with geometrical shapes and paths, making it useful for applications that require dynamic graphic generation. However, the library has a vulnerability in its extendObject function, which can lead to security risks when properties are copied from source objects without proper validation.
Vulnerability Detail
The vulnerability in Maker.js arises from the extendObject function, which copies properties from source objects using a for...in loop without adequate checks. Specifically, it does not utilize hasOwnProperty() to filter out inherited properties, nor does it block dangerous keys such as __proto__, constructor, and prototype. This oversight can lead to unexpected behavior in applications, allowing potentially malicious properties to be copied to target objects, which can compromise security assumptions in code that relies on hasOwnProperty() for validation.
How To Fix
Minimum fixed version
0.19.2
This is the first release that contains the fix.
npm install makerjs@0.19.2
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, you can manually filter properties when using the extendObject function. Here is an example of how to do this:
const makerjs = require('makerjs');
function safeExtendObject(target, source) {
for (let key in source) {
if (source.hasOwnProperty(key) && !['__proto__', 'constructor', 'prototype'].includes(key)) {
target[key] = source[key];
}
}
return target;
}
const source = { __proto__: { name: 'Ravi', isAdmin: true } };
const target = { name: 'user' };
const result = safeExtendObject(target, source);
console.log(result.name);
// user
console.log(result.isAdmin);
// undefined
Conclusion
The Maker.js library has a vulnerability in its extendObject function that allows unsafe property copying, which can lead to security risks. It is crucial to update to version 0.19.2 or later to mitigate these risks. Alternatively, a manual filtering workaround can be implemented until an update is possible.
See every vulnerability recorded for makerjs →
FAQ
The CVSS score of this vulnerability is 6.5, indicating a moderate severity level.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. You can check your application without signup using the Vulert playground.
The potential risks include unexpected behavior in applications and the possibility of security bypass, as inherited properties may be copied to target objects.
Yes, a patch is available in version 0.19.2 of the Maker.js package. Updating to this version will resolve the vulnerability.
If you cannot update the package, implement a manual property filtering method as a temporary workaround to mitigate the risks associated with the vulnerability.