Advisory

GHSA-c3m8-x3cg-qm2c

Also known as: None

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.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2020-09-03 20:39 UTC
Modified
2021-09-29 18:45 UTC

Affected packages and fixes

helmet-csp

npm · All systems

Affected

  • introduced 1.2.2, fixed 2.9.1 (semver)

Fixed versions

2.9.1

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences