Cloudanix VulnDB

CVE-2024-8373

Medium · 4.3

AngularJS allows attackers to bypass common image source restrictions

CVSS

4.3

EPSS

0.6%

Published

Sep 9, 2024

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

Old web applications can be tricked into showing fake pictures or content because a common check for image sources no longer works.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Data Tampering
Component
Web Framework
Class
XSS
Remediation
No Fix Yet
Effort
Other
Patch risk
Other

What it actually does

Improper sanitization of the srcset attribute on source HTML elements allows crafted values to bypass image source restrictions and enable content spoofing.

Why it matters to the business

Applications built on AngularJS can be tricked into displaying attacker-controlled content, eroding user trust and potentially aiding phishing or misinformation; because the framework is end-of-life, organizations must migrate or accept permanent exposure.

How an attack unfolds

An attacker supplies a malicious srcset value inside a source element that AngularJS renders without proper filtering, causing the browser to load attacker-chosen resources and thereby spoof image content or bypass CSP-style image restrictions.

How to fix it

Migrate away from AngularJS to a supported framework such as Angular; until migration is complete, add server-side or client-side sanitization that strips or validates srcset values on source elements.

How to confirm the fix worked

Audit the application for any remaining AngularJS usage and test picture/img elements to confirm that arbitrary srcset values are rejected or escaped.

Typical attack path

  1. Locate a web page rendered by AngularJS that includes img or picture elements
  2. Inject or supply a crafted srcset attribute on a source element
  3. Bypass existing image-source allow-lists or sanitizers
  4. Cause the browser to fetch and display attacker-controlled content

How to detect it

Search web-server and application logs for unexpected or encoded values appearing in srcset attributes on source tags; review rendered HTML for picture elements that contain non-whitelisted image sources.

What your security team should do

  • Prioritize migration off AngularJS within the next quarter
  • Implement additional input sanitization around srcset attributes as a temporary control
  • Review content-security-policy directives to limit image sources
  • Monitor for any downstream libraries still depending on AngularJS

The record

Improper sanitization of the value of the `[srcset]` attribute in `<source>` HTML elements in AngularJS allows attackers to bypass common image source restrictions, which can also lead to a form of Content Spoofing https://owasp.org/www-community/attacks/Content_Spoofing . This issue affects all versions of AngularJS. Note: The AngularJS project is End-of-Life and will not receive any updates to address this issue. For more information see here https://docs.angularjs.org/misc/version-support-status .

Affected packages

Ecosystem Package Introduced Fixed
npm angular 0 No fix
Chainguard solr 0 9.8.1-r0
Chainguard solr-oci-compat 0 9.8.1-r0
Debian:11 angular.js 0 No fix
Debian:12 angular.js 0 No fix
Debian:13 angular.js 0 No fix
Ubuntu:16.04:LTS angular.js 0 No fix
Ubuntu:18.04:LTS angular.js 0 No fix
Ubuntu:20.04:LTS angular.js 0 No fix
Ubuntu:22.04:LTS angular.js 0 No fix
Ubuntu:22.04:LTS angular.js 0 1.8.2-2ubuntu0.1
Ubuntu:24.04:LTS angular.js 0 No fix
Ubuntu:24.04:LTS angular.js 0 1.8.3-1ubuntu0.24.04.1
Ubuntu:24.10 angular.js 0 No fix
Ubuntu:25.04 angular.js 0 No fix
Ubuntu:25.10 angular.js 0 No fix
Ubuntu:Pro:16.04:LTS angular.js 0 No fix
Ubuntu:Pro:18.04:LTS angular.js 0 No fix
Ubuntu:Pro:18.04:LTS angular.js 0 1.5.10-1ubuntu0.1~esm1
Ubuntu:Pro:20.04:LTS angular.js 0 No fix
Ubuntu:Pro:20.04:LTS angular.js 0 1.7.9-1ubuntu0.1~esm1
Wolfi solr 0 9.8.1-r0
Wolfi solr-oci-compat 0 9.8.1-r0

Related vulnerabilities