Security
Headlines
HeadlinesLatestCVEs

Headline

GHSA-c4gr-q97g-ppwc: In Astro-Shield, setting a correct `integrity` attribute to injected code allows to bypass the allow-lists

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?

ghsa
#vulnerability#nodejs#git
  1. GitHub Advisory Database
  2. GitHub Reviewed
  3. CVE-2024-30250

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

Package

npm @kindspells/astro-shield (npm)

Affected versions

>= 1.2.0, < 1.3.2

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?

References

  • GHSA-c4gr-q97g-ppwc
  • kindspells/astro-shield@1221019
  • kindspells/astro-shield@5ae8b8e
  • https://github.com/kindspells/astro-shield/releases/tag/1.3.2

Published to the GitHub Advisory Database

Apr 1, 2024

ghsa: Latest News

GHSA-8495-4g3g-x7pr: aiohttp allows request smuggling due to incorrect parsing of chunk extensions