{"id":"CVE-2025-55164","aliases":["GHSA-w2cq-g8g3-gm83"],"url":"https://o3.security/vulnerability/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.","published":"2025-08-12T16:02:44.952Z","modified":"2026-08-12T03:51:46.599873539Z","cvss":null,"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"content-security-policy-parser","fixedVersion":"0.6.0"}],"fix":{"url":"https://github.com/helmetjs/content-security-policy-parser/commit/b13a52554f0168af393e3e38ed4a94e9e6aea9dc","label":"helmetjs/content-security-policy-parser@b13a525"},"references":[{"type":"WEB","url":"https://www.vicarius.io/vsociety/posts/cve-2025-55164-detect-node-csp-parser-vulnerability"},{"type":"WEB","url":"https://www.vicarius.io/vsociety/posts/cve-2025-55164-mitigate-csp-parser-vulnerability"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/55xxx/CVE-2025-55164.json"},{"type":"ADVISORY","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":"REPORT","url":"https://github.com/helmetjs/content-security-policy-parser/issues/11"},{"type":"FIX","url":"https://github.com/helmetjs/content-security-policy-parser/commit/b13a52554f0168af393e3e38ed4a94e9e6aea9dc"},{"type":"PACKAGE","url":"https://github.com/helmetjs/content-security-policy-parser"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:46.599873539Z"}}