Cross-Site Scripting Vulnerability in Angular.js Prior to 1.8.0

angular.js Updated 02 Oct 2025

Summary

08/06/2020
N/A
Yes i
Medium
5.4

CVE-2020-7676: angular.js prior to 1.8.0 allows cross site scripting. Affects angular.js across 2 version ranges.

< 1.8.0-1 < e55d352e942465479fa9f93b566db20a96b4cf15

Fixed in 1.8.0-1. How to fix ↓

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

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Angular.js is a widely-used JavaScript framework designed for building dynamic web applications. It provides a robust structure for developing single-page applications, allowing developers to create rich user interfaces with ease. However, prior to version 1.8.0, Angular.js was susceptible to a cross-site scripting (XSS) vulnerability that could compromise the security of applications built using this framework.

Vulnerability Detail

The vulnerability arises from a flaw in the regex-based input HTML replacement mechanism in Angular.js. This flaw can lead to sanitized code being turned into unsanitized code, particularly when <option> elements are wrapped in <select> elements. This change in parsing behavior can allow attackers to inject malicious scripts into web applications, potentially leading to unauthorized access to sensitive information or user sessions.

How To Fix

Minimum fixed version

1.8.0-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade angular.js

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If immediate upgrading is not feasible, consider implementing input validation and sanitization on user inputs to mitigate the risk of XSS attacks. Additionally, avoid using <option> elements within <select> elements in a way that could trigger this vulnerability until the upgrade is completed.

Conclusion

The cross-site scripting vulnerability in Angular.js prior to version 1.8.0 poses a significant risk to web applications built using this framework. It is crucial for developers to upgrade to the latest version to ensure the security of their applications. Additionally, utilizing tools like Vulert can help monitor and manage vulnerabilities effectively.

See every vulnerability recorded for angular.js →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 5.4, indicating a moderate level of severity.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. You can check your application using the Vulert playground without any signup.

If exploited, this vulnerability can allow attackers to execute malicious scripts in the context of the user's session, potentially leading to data theft, session hijacking, or other malicious activities.

Yes, upgrading to Angular.js version 1.8.0 or later will resolve this vulnerability.

If you cannot upgrade immediately, implement input validation and sanitization as a temporary measure to reduce the risk of XSS attacks.

Related vulnerabilities

Recent vulnerabilities recorded for angular.js.

How To Fix

Minimum fixed version

1.8.0-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade angular.js

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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