# GHSA-c3m8-x3cg-qm2c: Configuration Override in helmet-csp

- Severity: Medium 6.5 (CVSS:3.1, scored by GitHub) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2020-09-03T20:39:53.000Z
- Modified: 2021-09-29T18:45:07.000Z

## Description

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.

(As written by GitHub Advisory Database.)

## Affected

- helmet-csp (npm): from 1.2.2 before 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)

## Sources

- GitHub Advisory Database: [GHSA-c3m8-x3cg-qm2c](https://github.com/advisories/GHSA-c3m8-x3cg-qm2c), CC-BY-4.0, modified 2021-09-29

---

Page: https://cve.day/GHSA-c3m8-x3cg-qm2c · Whole record: https://cve.day/GHSA-c3m8-x3cg-qm2c.json · Rebuilt by cve.day 2026-11-25T22:56:45.018Z
