Vulnerability · Published Mar 28, 2024 · Assigned by GitHub_M
CVE-2024-29896Astro-Shield's Content-Security-Policy header generation in middleware could be compromised by malicious injections
High 7.5
In plain English
A high-severity injection in astro-shield from KindSpells. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.6% (higher than 48% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
Astro-Shield is a library to compute the subresource integrity hashes for your JS scripts and CSS stylesheets. When automated CSP headers generation for SSR content is enabled and the web application serves content that can be partially controlled by external users, then it is possible that the CSP headers generation feature might be "allow-listing" malicious injected resources like inlined JS, or references to external malicious scripts. The fix is available in version 1.3.0.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| npm | @kindspells/astro-shield | 1.3.0 | GHSA-w387-5qqw-7g8m |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| KindSpells | astro-shield | = 1.2.0 |
Weakness: CWE-74 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N