CVE-2024-30250: In Astro-Shield, setting a correct `integrity` attribute to injected code allows to bypass the allow-lists

Published Apr 1, 2024
·
Updated

Impact

Versions from 1.2.0 to 1.3.1 of Astro-Shield allow to bypass the allow-lists for cross-origin resources by introducing valid integrity attributes to the injected code. This implies that the injected SRI hash would be added to the generated CSP header, which would lead the browser to believe that the injected resource is legit.

To exploit this vulnerability, the attacker needs to first inject code into the rendered pages by exploiting other not-related potential vulnerabilities.

Patches

Version 1.3.2 provides a patch.

Workarounds - To not use the middleware functionality of Astro-Shield. - To use the middleware functionality of Astro-Shield ONLY for content that cannot be controlled in any way by external users.

References Are there any links users can visit to find out more?

Other sources

Astro-Shield is an integration to enhance website security with SubResource Integrity hashes, Content-Security-Policy headers, and other techniques. Versions from 1.2.0 to 1.3.1 of Astro-Shield allow bypass to the allow-lists for cross-origin resources by introducing valid integrity attributes to the injected code. This implies that the injected SRI hash would be added to the generated CSP header, which would lead the browser to believe that the injected resource is legit. This vulnerability is patched in version 1.3.2.

NVD

Affected Software

2 affected componentsFixes available
npm/@kindspells/astro-shield>=1.2.0<1.3.2
1.3.2
kindspells Astro-Shield>=1.2.0<1.3.2

Event History

Apr 1, 2024
Advisory Published
via GitHub·08:33 PM
Apr 4, 2024
CVE Published
via MITRE·02:57 PM
Data Sourced
via MITRE·02:57 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·03:15 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·03:15 PM
RemedyAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2024-30250?

CVE-2024-30250 is considered a medium severity vulnerability due to its ability to bypass cross-origin resource allow-lists.

2

How do I fix CVE-2024-30250?

To fix CVE-2024-30250, upgrade Astro-Shield to version 1.3.2 or later.

3

What versions are affected by CVE-2024-30250?

CVE-2024-30250 affects Astro-Shield versions from 1.2.0 to 1.3.1.

4

What does CVE-2024-30250 exploit?

CVE-2024-30250 exploits the ability to introduce valid integrity attributes in order to manipulate cross-origin resource policies.

5

Is CVE-2024-30250 related to content security policies?

Yes, CVE-2024-30250 concerns the manipulation of content security policies via injected code.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203