GHSA-28hp-fgcr-2r4h: Angular Cross-Site Scripting Vulnerability
MODERATEGHSA-28hp-fgcr-2r4h is a MODERATE cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Angular libraries in the npm ecosystem. The issue involves cross-site scripting via jsonp. Remediation is available by upgrading affected packages to version 1.6.0.
GHSA-28hp-fgcr-2r4h at a Glance
How to Fix GHSA-28hp-fgcr-2r4h
To remediate this vulnerability, upgrade all affected Angular dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install angular@1.6.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls angular
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-28hp-fgcr-2r4h, inspect your project dependencies using npm:
npm ls angular
Analyze the terminal output to locate any version of Angular in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.6.0), your application is affected.
Note: The npm ls angular command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Angular, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-28hp-fgcr-2r4h Affected Angular Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
angular
|
npm |
< 1.6.0
|
1.6.0
|
References
Frequently Asked Questions
What is GHSA-28hp-fgcr-2r4h?
Which Angular versions are affected?
What version fixes GHSA-28hp-fgcr-2r4h?
Is angular affected?
What CWE is associated with GHSA-28hp-fgcr-2r4h?
How can I check npm dependencies for GHSA-28hp-fgcr-2r4h?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-28hp-fgcr-2r4h",
"modified" : "2021-02-24T18:32:36Z",
"published" : "2019-06-27T17:25:42Z",
"aliases" : [ ],
"summary" : "Cross-Site Scripting via JSONP",
"details" : "JSONP allows untrusted resource URLs, which provides a vector for attack by malicious actors.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "angular"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.6.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/angular/angular.js/commit/6476af83cd0418c84e034a955b12a842794385c4"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/1630"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2019-06-27T15:51:47Z",
"nvd_published_at" : null
}
}