7.5high
In Astro-Shield, setting a correct `integrity` attribute to injected code allows to bypass the allow-lists
- Severity
- 7.5high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.31% (higher than 25% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-c4gr-q97g-ppwc
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| kindspells astro-shield | >= 1.2.0, < 1.3.2, from 1.2.0 before 1.3.2 | CVE List, NVD |
| @kindspells/astro-shield (npm) | from 1.2.0 before 1.3.2 | GitHub Advisory Database |
All scores
| GitHub_M | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| GitHub | high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
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.
GitHub Advisory Database
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?
NVD (es)
Astro-Shield es una integración para mejorar la seguridad del sitio web con hashes de integridad de subrecursos, encabezados de política de seguridad de contenido y otras técnicas. Las versiones de 1.2.0 a 1.3.1 de Astro-Shield permiten eludir las listas permitidas para recursos de origen cruzado al introducir atributos de "integridad" válidos en el código inyectado. Esto implica que el hash SRI inyectado se agregaría al encabezado CSP generado, lo que llevaría al navegador a creer que el recurso inyectado es legítimo. Esta vulnerabilidad está parcheada en la versión 1.3.2.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-30250 changed 2024-08-02 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-c4gr-q97g-ppwc changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2024-30250 changed 2026-06-17 | Public domain |