AngularJS - Bypassing Image Source Restrictions

angular Updated 02 Oct 2025

Summary

09/09/2024
No i
Low
4.8

CVE-2024-8373: AngularJS allows attackers to bypass common image source restrictions. Affects angular versions < 1.8.3. No fix is published. How to fix ↓

Also tracked for

The same CVE-2024-8373 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

AngularJS is an open-source JavaScript framework developed by Google. It is widely used for building dynamic web applications. The framework provides a set of tools and features that enable developers to create single-page applications efficiently. However, AngularJS is vulnerable to a specific issue related to the improper sanitization of the [srcset] attribute in <source> HTML elements. This vulnerability allows attackers to bypass common image source restrictions, potentially leading to content spoofing attacks.

Vulnerability Detail

The vulnerability in AngularJS arises from the improper sanitization of the [srcset] attribute in <source> HTML elements. This attribute is used to specify a set of image sources and their corresponding sizes, allowing the browser to choose the most appropriate image to display based on the device's characteristics. However, due to the lack of proper sanitization, an attacker can manipulate the [srcset] attribute to bypass image source restrictions imposed by the application. This can lead to content spoofing attacks, where the attacker can trick users into viewing malicious or misleading content.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

There is no specific workaround provided for this vulnerability. However, developers can implement custom input validation and sanitization mechanisms to ensure that the [srcset] attribute is properly sanitized before being rendered in the HTML. This can help mitigate the risk of content spoofing attacks.

Conclusion

AngularJS is vulnerable to a content spoofing attack due to the improper sanitization of the [srcset] attribute in <source> HTML elements. As the project is end-of-life, no official fix is available. Developers should consider migrating to newer frameworks and follow best practices for input validation and sanitization to mitigate the risk of content spoofing attacks.

See every vulnerability recorded for angular →

Share this vulnerability

FAQ

AngularJS is an open-source JavaScript framework developed by Google. It is used for building dynamic web applications.

Content spoofing is a type of attack where an attacker manipulates the content displayed to users, often by bypassing security measures or injecting malicious content.

The vulnerability allows attackers to bypass image source restrictions, potentially leading to content spoofing attacks. This can result in users being tricked into viewing malicious or misleading content.

As AngularJS is an end-of-life project, there is no official fix. However, developers can consider migrating to newer frameworks or libraries that provide better security features.

Developers can implement custom input validation and sanitization mechanisms to ensure that user-supplied data, such as the [srcset] attribute, is properly sanitized before being rendered in the HTML.

Related vulnerabilities

Recent vulnerabilities recorded for angular.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback