CVE-2025-55164: Content security policy parser Remote Code Execution Vulnerability
HIGHCVE-2025-55164 is a HIGH remote code execution vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting Content security policy parser libraries in the npm ecosystem. The issue involves content-security-policy-parser prototype pollution vulnerability may lead to rce. Remediation is available by upgrading affected packages to version 0.6.0.
CVE-2025-55164 at a Glance
How to Fix CVE-2025-55164
To remediate this vulnerability, upgrade all affected Content security policy parser dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install content-security-policy-parser@0.6.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls content-security-policy-parser
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2025-55164, inspect your project dependencies using npm:
npm ls content-security-policy-parser
Analyze the terminal output to locate any version of Content security policy parser in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.6.0), your application is affected.
Note: The npm ls content-security-policy-parser command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'), where 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. In Content security policy parser, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-55164 Affected Content security policy parser Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
content-security-policy-parser
|
npm |
< 0.6.0
|
0.6.0
|
References
Frequently Asked Questions
What is CVE-2025-55164?
Which Content security policy parser versions are affected?
What version fixes CVE-2025-55164?
Is content-security-policy-parser affected?
What CWE is associated with CVE-2025-55164?
How can I check npm dependencies for CVE-2025-55164?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-w2cq-g8g3-gm83",
"modified" : "2025-08-12T19:19:42Z",
"published" : "2025-08-12T18:07:44Z",
"aliases" : [ "CVE-2025-55164" ],
"summary" : "content-security-policy-parser Prototype Pollution Vulnerability May Lead to RCE",
"details" : "### Impact\nA 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.\n\nFor example:\n\n```\nconst parse = require('content-security-policy-parser');\n\nconst x = parse(\"default-src 'self'; __proto__ foobar\");\nconsole.log('raw print:', x);\nconsole.log('toString:', x.toString());\n```\n\nOutputs:\n\n```\nraw print: Array { 'default-src': [ \"'self'\" ] }\ntoString: foobar\n```\n\nWhilst 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.\n\nAs the content security policy is provided in HTTP queries, it is incredibly likely that network exploitation is possible.\n\n### Patches\nThere 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.\n\n### Workarounds\nBy 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.\n\n### References\n[Issue revealing the problem, January 26 2024](https://github.com/helmetjs/content-security-policy-parser/issues/11)\n[Commit fixing the problem](https://github.com/helmetjs/content-security-policy-parser/commit/b13a52554f0168af393e3e38ed4a94e9e6aea9dc)\n\nCredit to @EvanHahn for patching the vulnerability promptly, and @pnappa (Patrick Nappa) for discovery.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "content-security-policy-parser"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.6.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/helmetjs/content-security-policy-parser/security/advisories/GHSA-w2cq-g8g3-gm83"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-55164"
}, {
"type" : "WEB",
"url" : "https://github.com/helmetjs/content-security-policy-parser/issues/11"
}, {
"type" : "WEB",
"url" : "https://github.com/helmetjs/content-security-policy-parser/commit/b13a52554f0168af393e3e38ed4a94e9e6aea9dc"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/helmetjs/content-security-policy-parser"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1321" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-08-12T18:07:44Z",
"nvd_published_at" : "2025-08-12T16:15:29Z"
}
}