Cross-site Scripting (XSS) Vulnerability in Angular.js: Insecure Page Caching in Internet Explorer
Summary
CVE-2022-25869: All versions of the package angular; all versions of the package angularjs.core; all versions of the package angularjs are vulnerable to Cross-site Scripting (XSS) due to insecure page caching in the Internet Explorer br... Affects angular.js versions 1.8.2-2 – 1.8.3-3. No fix is published. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
Angular.js is a widely-used JavaScript framework designed for building dynamic web applications. It provides a robust set of features including two-way data binding, dependency injection, and a modular architecture, making it a popular choice among developers. However, all versions of Angular.js are susceptible to a Cross-site Scripting (XSS) vulnerability due to insecure page caching specifically in the Internet Explorer browser. This vulnerability allows attackers to exploit the interpolation of <textarea> elements, potentially leading to unauthorized access to sensitive information.
Vulnerability Detail
The vulnerability arises from the way Angular.js handles page caching in Internet Explorer. When a page is cached, it may not properly sanitize user inputs, particularly those within <textarea> elements. This oversight allows malicious scripts to be injected and executed in the context of the user's browser session. The ramifications of this vulnerability can be severe, as it could lead to data theft, session hijacking, or other malicious activities. The technical aspect of this vulnerability is rooted in the failure to validate and sanitize user inputs effectively, making it a critical issue for applications using Angular.js.
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
As a temporary workaround, developers can disable caching for pages that utilize Angular.js in Internet Explorer. This can be achieved by setting appropriate HTTP headers such as 'Cache-Control: no-store' or 'Pragma: no-cache' to prevent the browser from caching sensitive pages.
Conclusion
In summary, the Cross-site Scripting (XSS) vulnerability in Angular.js due to insecure page caching in Internet Explorer poses significant risks to web applications. It is crucial for developers to update their Angular.js versions, implement proper input validation, and consider temporary workarounds to mitigate the risks associated with this vulnerability.
See every vulnerability recorded for angular.js →
FAQ
Cross-site Scripting (XSS) is a security vulnerability that allows attackers to inject malicious scripts into web pages viewed by other users, potentially leading to data theft or unauthorized actions.
All versions of Angular.js are vulnerable to this XSS issue due to insecure page caching in Internet Explorer.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.
The potential impacts include data theft, session hijacking, and unauthorized access to sensitive information, which can compromise user security.
The CVSS score of this vulnerability is 6.1, indicating a medium severity level.
Related vulnerabilities
Recent vulnerabilities recorded for angular.js.