{"id":"GHSA-w387-5qqw-7g8m","summary":"Content-Security-Policy header generation in middleware could be compromised by malicious injections","details":"### 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?_\n","aliases":["CVE-2024-29896"],"modified":"2026-08-24T00:35:34.745991154Z","published":"2024-03-29T19:03:59Z","database_specific":{"nvd_published_at":"2024-03-28T13:15:47Z","cwe_ids":["CWE-74"],"severity":"HIGH","github_reviewed":true,"github_reviewed_at":"2024-03-29T19:03:59Z"},"references":[{"type":"WEB","url":"https://github.com/KindSpells/astro-shield/security/advisories/GHSA-w387-5qqw-7g8m"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-29896"},{"type":"WEB","url":"https://github.com/KindSpells/astro-shield/commit/41b84576d37fa486a57005ea297658d0bc38566d"},{"type":"WEB","url":"https://github.com/KindSpells/astro-shield/commit/ad3abf5577bae9be420b7ddf376337a5b8817869"},{"type":"PACKAGE","url":"https://github.com/KindSpells/astro-shield"},{"type":"WEB","url":"https://github.com/KindSpells/astro-shield/compare/1.2.0...1.3.0"}],"affected":[{"package":{"name":"@kindspells/astro-shield","ecosystem":"npm","purl":"pkg:npm/%40kindspells/astro-shield"},"ranges":[{"type":"SEMVER","events":[{"introduced":"1.2.0"},{"fixed":"1.3.0"}]}],"versions":["1.2.0"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/03/GHSA-w387-5qqw-7g8m/GHSA-w387-5qqw-7g8m.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"},{"type":"CVSS_V4","score":"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"}]}