Cross-Site Scripting via JSONP in Angular

angular Updated 02 Oct 2025

Summary

27/06/2019
MODERATE
Yes i
Moderate
Not published

GHSA-28hp-fgcr-2r4h: Cross-Site Scripting via JSONP. Affects angular versions < 1.6.0. Fixed in 1.6.0. 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 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

Angular is a popular open-source framework for building web applications. It provides a comprehensive set of features and tools to simplify the development process. However, Angular is vulnerable to a Cross-Site Scripting (XSS) attack via JSONP.

Vulnerability Detail

The vulnerability in Angular allows untrusted resource URLs, which provides a vector for attack by malicious actors. This can lead to the execution of arbitrary JavaScript code in the context of the affected user's browser, potentially compromising sensitive information or performing unauthorized actions.

How To Fix

Minimum fixed version

1.6.0

This is the first release that contains the fix.

npm install angular@1.6.0

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

Workaround

If upgrading to the latest version is not feasible, a workaround is to manually validate and sanitize the resource URLs before using them in JSONP requests. This can be done by implementing proper input validation and output encoding techniques.

Conclusion

The vulnerability in Angular that allows Cross-Site Scripting via JSONP can have serious security implications. It is crucial to upgrade to the latest version or apply the recommended workaround to mitigate the risk. For further support on vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for angular →

Share this vulnerability

FAQ

JSONP (JSON with Padding) is a technique used to overcome the same-origin policy in web browsers. It allows making cross-domain requests by dynamically adding a script tag to the HTML page.

The JSONP vulnerability in Angular occurs when untrusted resource URLs are allowed in JSONP requests. This can be exploited by an attacker to inject malicious JavaScript code into the response, which is then executed in the user's browser.

The consequences of this vulnerability can vary depending on the attacker's intentions. It can lead to the theft of sensitive information, such as user credentials or personal data, or the manipulation of the application's behavior to perform unauthorized actions.

While there may not be a specific known exploit for this vulnerability in Angular, the underlying XSS vulnerability is a well-known and widely exploited issue in web applications. It is important to address this vulnerability to prevent potential attacks.

Input validation is an important part of preventing XSS attacks, but it is not sufficient to fully mitigate this vulnerability. Output encoding and proper context-aware sanitization are also necessary to ensure the security of the application.

Related vulnerabilities

Recent vulnerabilities recorded for angular.

How To Fix

Minimum fixed version

1.6.0

This is the first release that contains the fix.

npm install angular@1.6.0

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