traverse is vulnerable to Prototype Pollution
69
CVE Score
Medium
Prototype Pollution
Application code calls traverse's Traverse.prototype.set(path, value) with an array of property-name segments. The method walks that path, creates intermediate nodes, and assigns the final value with a plain property write. Before the fix, the library does not sanitize those segments by default. A caller that forwards an external path (for example parsed JSON keys) can cross a primitive and then use __proto__, constructor, or prototype, so the write lands on a shared built-in prototype such as String.prototype, Number.prototype, or Boolean.prototype instead of an own property. A path segment object whose toString changes between uses, or a Proxy that accepts an assignment without storing it, can reach Object.prototype. The fix coerces each path segment to a property key exactly once, keeps __proto__ as an own data property instead of replacing the object's prototype, and throws a TypeError when the path crosses or ends on a primitive, or when a created segment fails to become an own property.
Upgrade the traverse package to a patched version.
You are affected if you are using a version that falls within the vulnerable range and pass externally supplied path segments to the traverse object's set method.
0.3.6 - 0.3.9
Fixed in 0.3.100.4.0 - 0.4.6
Fixed in 0.4.70.5.0 - 0.5.2
Fixed in 0.5.30.6.0 - 0.6.11
Fixed in 0.6.12traverse is vulnerable to Prototype Pollution in versions 0.3.6 - 0.3.9, 0.4.0 - 0.4.6, 0.5.0 - 0.5.2 and 0.6.0 - 0.6.11.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.