GHSA-c3m8-x3cg-qm2c Configuration Override in helmet-csp
Attacker can bypass Content Security Policy protections in helmet-csp, potentially enabling Cross-Site Scripting attacks against web applications.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is GHSA-c3m8-x3cg-qm2c?
GHSA-c3m8-x3cg-qm2c is a vulnerability in helmet-csp, published on 3 Sep 2020. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official 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.
Which versions are affected by GHSA-c3m8-x3cg-qm2c?
2 open source packages ship an affected version, including helmet-csp.
| Package | Affected | Fixed in |
|---|---|---|
helmet-csp npm | From 1.2.2 | 2.9.1 |
helmet-csp npm | From 1.2.2 | 2.9.1 |
How do I fix GHSA-c3m8-x3cg-qm2c?
Upgrade helmet-csp to 2.9.1 or later.
Is GHSA-c3m8-x3cg-qm2c being exploited?
There is no known exploitation of GHSA-c3m8-x3cg-qm2c in the wild and no public exploit code.