CVE-2024-8373
Medium · 4.3AngularJS allows attackers to bypass common image source restrictions
CVSS
4.3
EPSS
0.6%
Published
Sep 9, 2024
CISA due date
—
Cloudanix analysis
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
- Locate a web page rendered by AngularJS that includes img or picture elements
- Inject or supply a crafted srcset attribute on a source element
- Bypass existing image-source allow-lists or sanitizers
- 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
- CVE-2024-8372 AngularJS allows attackers to bypass common image source restrictions Also affects angular
- CVE-2022-25869 All versions of package angular are vulnerable to Cross-site Scripting (XSS) due to… Also affects angular
- CVE-2026-24281 Hostname verification in Apache ZooKeeper ZKTrustManager falls back to reverse DNS (PTR)… Also affects solr
- CVE-2026-24308 Improper handling of configuration values in ZKConfig in Apache ZooKeeper 3.8.5 and 3.9.4… Also affects solr
- CVE-2026-1605 In Eclipse Jetty, versions 12.0.0-12.0.31 and 12.1.0-12.0.5, class GzipHandler exposes a… Also affects solr
- CVE-2025-11143 The Jetty URI parser has some key differences to other common parsers when evaluating… Also affects solr
- CVE-2026-22022 Apache Solr: Unauthorized bypass of certain "predefined permission" rules in the… Also affects solr
- CVE-2026-22444 Apache Solr: Insufficient file-access checking in standalone core-creation requests Also affects solr