{"id":"CVE-2024-29896","aliases":["CVE-2024-29896","GHSA-w387-5qqw-7g8m"],"related":[],"kind":"vulnerability","state":"published","title":"Astro-Shield's Content-Security-Policy header generation in middleware could be compromised by malicious injections","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nWhen the following conditions are met:\n- Automated CSP headers generation for SSR content is enabled\n- The web application serves content that can be partially controlled by external users\n\nThen 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.\n\n### Patches\nAvailable in version 1.3.0 .\n\n### Workarounds\n- Do not enable CSP headers generation.\n- Use it only for dynamically generated content that cannot be controlled by external users in any way.\n\n### References\n_Are there any links users can visit to find out more?_","format":"markdown","source":"ghsa"},{"lang":"es","text":"Astro-Shield es una librería para calcular los hashes de integridad de los subrecursos para sus scripts JS y hojas de estilo CSS. Cuando la generación automatizada de encabezados CSP para contenido SSR está habilitada y la aplicación web ofrece contenido que puede ser controlado parcialmente por usuarios externos, entonces es posible que la función de generación de encabezados CSP pueda \"listar permitidos\" recursos maliciosos inyectados como JS en línea o referencias a scripts maliciosos externos. La solución está disponible en la versión 1.3.0.","source":"nvd"}],"published":"2024-03-28T12:48:53.104Z","modified":"2026-09-10T03:50:10.744Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"HIGH"}],"cwes":["CWE-74"],"affected":[{"ranges":[{"version":"= 1.2.0","status":"affected"}],"vendor":"KindSpells","product":"astro-shield","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"1.2.0","fixed":"1.3.0","status":"affected"}],"vendor":"kindspells","product":"astro-shield","cpe":"cpe:2.3:a:kindspells:astro-shield:1.2.0:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"1.2.0","status":"affected","fixed":"1.3.0"}],"ecosystem":"npm","package":"@kindspells/astro-shield","purl":"pkg:npm/%40kindspells/astro-shield","source":"ghsa"},{"ranges":[{"status":"affected","version":"1.2.0"}],"vendor":"kindspells","product":"astro-shield","cpe":"cpe:2.3:a:kindspells:astro-shield:1.2.0:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/KindSpells/astro-shield/security/advisories/GHSA-w387-5qqw-7g8m","tags":["vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/KindSpells/astro-shield/commit/41b84576d37fa486a57005ea297658d0bc38566d","tags":["patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-29896","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/KindSpells/astro-shield/commit/ad3abf5577bae9be420b7ddf376337a5b8817869","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/KindSpells/astro-shield","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/KindSpells/astro-shield/compare/1.2.0...1.3.0","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2024-06-20T15:06:11.110Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-29896","url":"https://www.cve.org/CVERecord?id=CVE-2024-29896","licence":"CVE Terms of Use","modified":"2024-08-02T01:17:58.611Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-w387-5qqw-7g8m","url":"https://github.com/advisories/GHSA-w387-5qqw-7g8m","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:10.744Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-29896","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-29896","licence":"Public domain","modified":"2026-06-17T07:23:19.533Z"}],"updatedAt":"2026-11-25T22:58:38.074Z","epss":{"score":0.00591,"percentile":0.49617,"date":"2026-12-01T12:00:22.000Z"}}