Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. content-security-policy-parser
  4. ›
  5. CVE-2025-55164

CVE-2025-55164: content-security-policy-parser Prototype Pollution Vulnerability May Lead to RCE

August 12, 2025

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.

References

  • github.com/advisories/GHSA-w2cq-g8g3-gm83
  • github.com/helmetjs/content-security-policy-parser
  • github.com/helmetjs/content-security-policy-parser/commit/b13a52554f0168af393e3e38ed4a94e9e6aea9dc
  • github.com/helmetjs/content-security-policy-parser/issues/11
  • github.com/helmetjs/content-security-policy-parser/security/advisories/GHSA-w2cq-g8g3-gm83
  • nvd.nist.gov/vuln/detail/CVE-2025-55164

Code Behaviors & Features

Detect and mitigate CVE-2025-55164 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.6.0

Fixed versions

  • 0.6.0

Solution

Upgrade to version 0.6.0 or above.

Weakness

  • CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')

Source file

npm/content-security-policy-parser/CVE-2025-55164.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 19 Aug 2025 12:18:30 +0000.