GHSA-c3m8-x3cg-qm2c
MEDIUM 6.5CVSS 3.1Configuration Override in helmet-csp
Versions of helmet-csp before to 2.9.1 are vulnerable to a Configuration Override affecting the application's Content Security Policy (CSP). The package's browser sniffing for Firefox deletes the default-src CSP policy, which is the fallback policy. This allows an attacker to remove an application's default CSP, possibly rendering the application vulnerable to Cross-Site Scripting.
Recommendation
Upgrade to version 2.9.1 or later. Setting the browserSniff configuration to false in vulnerable versions also mitigates the issue.
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | npm | helmet-csp | >= 1.2.2, < 2.9.1 | 2.9.1 |
References
- https://github.com/helmetjs/csp/commit/67a69baafa8198a154f0505a0cf0875f76f6186a · WEB
- https://github.com/helmetjs/csp · WEB
- https://snyk.io/vuln/SNYK-JS-HELMETCSP-469436 · WEB
- https://www.npmjs.com/advisories/1176 · WEB
History
- 25 Nov 2026 20:10 UTC · OSV: first stored (published 3 Sep 2020)