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

High 7.5 Published Updated

Attackers can bypass Content Security Policy protections by injecting malicious resources when automated CSP generation is enabled in Astro-Shield.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2024-29896?

CVE-2024-29896 is a high-severity vulnerability in KindSpells astro-shield, published on 28 Mar 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

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.

Weakness: CWE-74

Which versions are affected by CVE-2024-29896?

2 open source packages ship an affected version, including @kindspells/astro-shield. It affects 1 product.

PackageAffectedFixed in
@kindspells/astro-shield npmFrom 1.2.01.3.0
@kindspells/astro-shield npmFrom 1.2.01.3.0

Products include Kindspells Astro-Shield.

How do I fix CVE-2024-29896?

Upgrade @kindspells/astro-shield to 1.3.0 or later.

Is CVE-2024-29896 being exploited?

There is no known exploitation of CVE-2024-29896 in the wild and no public exploit code.

Sources

Also known as GHSA-w387-5qqw-7g8m.

Is CVE-2024-29896 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free