Summary
content-security-policy-parser Prototype Pollution Vulnerability May Lead to RCE
Workarounds
By disabling prototype method in NodeJS you can neutralise all possible prototype pollution attacks. Provide either --disable-proto=delete (recommended) or --disable-proto=throw as an argument to node to enable this feature.
References
Issue revealing the problem, January 26 2024
Commit fixing the problem
Credit to @EvanHahn for patching the vulnerability promptly, and @pnappa (Patrick Nappa) for discovery.
Impact
A prototype pollution vulnerability exists in versions 0.5.0 and earlier, wherein if you provide a policy name called __proto__ you can override the Object prototype.
For example:
const parse = require('content-security-policy-parser');
const x = parse("default-src 'self'; __proto__ foobar");
console.log('raw print:', x);
console.log('toString:', x.toString());
Outputs:
raw print: Array { 'default-src': [ "'self'" ] }
toString: foobar
Whilst no gadget exists in this library, it is possible via other libraries expose functionality that enable RCE. It is customary to label prototype pollution vulnerabilities in this way. The most common effect of this is denial of service, as you can trivially overwrite properties.
As the content security policy is provided in HTTP queries, it is incredibly likely that network exploitation is possible.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
There has been a patch implemented a year ago (11 Feb 2024), but low uptake of patched versions has not been observed in the wild - only 17% of weekly downloads are of patched versions.
Frequently Asked Questions
- What is CVE-2025-55164? CVE-2025-55164 is a high-severity security vulnerability in content-security-policy-parser (npm), affecting versions < 0.6.0. It is fixed in 0.6.0.
- Which versions of content-security-policy-parser are affected by CVE-2025-55164? content-security-policy-parser (npm) versions < 0.6.0 is affected.
- Is there a fix for CVE-2025-55164? Yes. CVE-2025-55164 is fixed in 0.6.0. Upgrade to this version or later.
- Is CVE-2025-55164 exploitable, and should I be worried? Whether CVE-2025-55164 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2025-55164 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2025-55164? Upgrade
content-security-policy-parserto 0.6.0 or later.