CVE-2024-8372: AngularJS image srcset attribute bypass in Content Security Policy

CVE-2024-8372 · Severity: low · CVSS 3.1 · Published 2024-09-09

AngularJS, a popular JavaScript framework used to build dynamic web applications, improperly sanitizes the srcset attribute in image tags. This allows attackers to bypass Content Security Policy (CSP) restrictions designed to prevent unauthorized image loading, potentially leading to data leakage or displaying malicious content to users. AngularJS is end-of-life and will not receive patches for this issue.

Technologies: angular (npm). Vendors: npm.

Quick answers

Is CVE-2024-8372 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2024-8372 being exploited in the wild.
How severe is CVE-2024-8372?
Low severity, with a CVSS score of 3.1, published 9 September 2024.
Which products and versions are affected?
angular (npm) SEMVER:introduced=1.3.0-rc.4,last_affected=1.8.3.
Is there a fix for CVE-2024-8372?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is CVE-2024-8372 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2024-8372?
Check whether you run angular (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

This vulnerability is an improper input sanitization flaw (CWE-1289) affecting AngularJS versions 1.3.0-rc.4 through 1.8.3. The srcset attribute on image elements is not properly sanitized, allowing attackers to construct malicious values that bypass Content Security Policy image source directives. The attack is network-accessible but requires manipulation of attribute values, typically through reflected or stored XSS or user-controlled template injection. Exploitation can result in CSP bypass and content spoofing attacks. No patch is available as the AngularJS project reached end-of-life and will not address this issue.

Affected products

  • Google AngularJS 1.3.0-rc.4 through 1.8.3

Identifiers

  • CVE-2024-8372
  • GHSA-m9gf-397r-hwpg

Timeline

  • 2024-09-09: disclosed

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.