CVE-2018-16492: Prototype Pollution in extend

extend Updated 02 Oct 2025

Summary

07/02/2019
Yes i
Moderate
Not published

CVE-2018-16492: Prototype Pollution in extend. Affects extend across 2 version ranges.

< 2.0.2 >= 3.0.0, < 3.0.2

Fixed in 2.0.2 or 3.0.2, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2018-16492 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The extend package is an npm package that provides a utility function called extend() for extending objects in JavaScript. It allows developers to merge multiple objects into a single object, combining their properties. However, versions of extend prior to 3.0.2 (for 3.x) and 2.0.2 (for 2.x) are vulnerable to Prototype Pollution.

Vulnerability Detail

Prototype Pollution is a vulnerability that occurs when an attacker can modify the prototype of an object, leading to the addition or modification of properties that will exist on all objects. In the case of extend, the extend() function can be exploited by attackers to pollute the prototype of the Object constructor, allowing them to modify or add properties that will affect all objects in the application. This can lead to unexpected behavior, data tampering, or even remote code execution.

How To Fix

Latest published version: 3.0.2 as of 23 Oct 2026

npm install extend@3.0.2

The newest release already contains this fix.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 2.0.2 2.0.2
    npm install extend@2.0.2

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

There is no known workaround for this vulnerability. It is recommended to upgrade to the fixed versions of extend as mentioned above.

Conclusion

In conclusion, the extend package prior to versions 3.0.2 (for 3.x) and 2.0.2 (for 2.x) is vulnerable to Prototype Pollution. It is crucial to upgrade to the fixed versions to mitigate the risk of unexpected behavior, data tampering, or remote code execution. For further support on vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for extend →

Share this vulnerability

FAQ

Prototype Pollution is a vulnerability that allows attackers to modify the prototype of an object, leading to the addition or modification of properties that will exist on all objects.

The impact of this vulnerability can vary depending on how the affected package is used. It can lead to unexpected behavior, data tampering, or even remote code execution.

You can use the Vulert Playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply upload your package-lock.json file and it will alert you if the vulnerability is present.

There are no known workarounds for this vulnerability. It is recommended to upgrade to the fixed versions of extend.

How To Fix

Latest published version: 3.0.2 as of 23 Oct 2026

npm install extend@3.0.2

The newest release already contains this fix.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • < 2.0.2 2.0.2
    npm install extend@2.0.2

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback