GHSA-c3m8-x3cg-qm2c

Suggest an improvement
Source
https://github.com/advisories/GHSA-c3m8-x3cg-qm2c
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/09/GHSA-c3m8-x3cg-qm2c/GHSA-c3m8-x3cg-qm2c.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-c3m8-x3cg-qm2c
Published
2020-09-03T20:39:53Z
Modified
2021-09-29T18:45:07Z
Severity
  • 6.5 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N CVSS Calculator
Summary
Configuration Override in helmet-csp
Details

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.

Database specific
{
    "cwe_ids":  [],
    "github_reviewed":  true,
    "github_reviewed_at":  "2020-08-31T18:50:01Z",
    "nvd_published_at":  null,
    "severity":  "MODERATE"
}
References

Affected packages

npm / helmet-csp

Package

Affected ranges

Type
SEMVER
Events
Introduced
1.2.2
Fixed
2.9.1

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/09/GHSA-c3m8-x3cg-qm2c/GHSA-c3m8-x3cg-qm2c.json"