Skip to content

Configuration Override in helmet-csp

Moderate severity GitHub Reviewed Published Sep 3, 2020 to the GitHub Advisory Database • Updated Jan 9, 2023

Package

npm helmet-csp (npm)

Affected versions

>= 1.2.2, < 2.9.1

Patched versions

2.9.1

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.

References

Reviewed Aug 31, 2020
Published to the GitHub Advisory Database Sep 3, 2020
Last updated Jan 9, 2023

Severity

Moderate
6.5
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
None
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

Weaknesses

No CWEs

CVE ID

No known CVE

GHSA ID

GHSA-c3m8-x3cg-qm2c

Source code

Checking history
See something to contribute? Suggest improvements for this vulnerability.