Lookup for vulnerable packages by Package URL.

Purlpkg:npm/%40angular/compiler@12.0.4
Typenpm
Namespace@angular
Namecompiler
Version12.0.4
Qualifiers
Subpath
Is_vulnerabletrue
Next_non_vulnerable_version19.2.20
Latest_non_vulnerable_version22.0.0-next.3
Affected_by_vulnerabilities
0
url VCID-3mrw-2h7j-zfdv
vulnerability_id VCID-3mrw-2h7j-zfdv
summary
Angular Stored XSS Vulnerability via SVG Animation, SVG URL and MathML Attributes
A **Stored Cross-Site Scripting ([XSS](https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss))** vulnerability has been identified in the **Angular Template Compiler**. It occurs because the compiler's internal security schema is incomplete, allowing attackers to bypass Angular's built-in security sanitization. Specifically, the schema fails to classify certain URL-holding attributes (e.g., those that could contain [`javascript:` URLs](https://developer.mozilla.org/en-US/Web/URI/Reference/Schemes/javascript)) as requiring strict URL security, enabling the injection of malicious scripts.

Additionally, a related vulnerability exists involving SVG animation elements (`<animate>`, `<set>`, `<animateMotion>`, `<animateTransform>`). The `attributeName` attribute on these elements was not properly validated, allowing attackers to dynamically target security-sensitive attributes like `href` or `xlink:href` on other elements. By binding `attributeName` to "href" and providing a `javascript:` URL in the `values` or `to` attribute, an attacker could bypass sanitization and execute arbitrary code.

Attributes confirmed to be vulnerable include:
*   SVG-related attributes: (e.g., `xlink:href`), and various MathML attributes (e.g., `math|href`, `annotation|href`).
*   SVG animation `attributeName` attribute when bound to "href" or "xlink:href".

When template binding is used to assign untrusted, user-controlled data to these attributes (e.g., `[attr.xlink:href]="maliciousURL"` or `<animate [attributeName]="'href'" [values]="maliciousURL">`), the compiler incorrectly falls back to a non-sanitizing context or fails to block the dangerous attribute assignment. This allows an attacker to inject a `javascript:URL` payload. Upon user interaction (like a click) on the element, or automatically in the case of animations, the malicious JavaScript executes in the context of the application's origin.
references
0
reference_url https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2025-66412.json
reference_id
reference_type
scores
0
value 8.1
scoring_system cvssv3
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
url https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2025-66412.json
1
reference_url https://api.first.org/data/v1/epss?cve=CVE-2025-66412
reference_id
reference_type
scores
0
value 0.00052
scoring_system epss
scoring_elements 0.16178
published_at 2026-04-21T12:55:00Z
1
value 0.00052
scoring_system epss
scoring_elements 0.16142
published_at 2026-04-18T12:55:00Z
2
value 0.00052
scoring_system epss
scoring_elements 0.16124
published_at 2026-04-16T12:55:00Z
3
value 0.00052
scoring_system epss
scoring_elements 0.16187
published_at 2026-04-13T12:55:00Z
4
value 0.00052
scoring_system epss
scoring_elements 0.16254
published_at 2026-04-12T12:55:00Z
5
value 0.00052
scoring_system epss
scoring_elements 0.16294
published_at 2026-04-11T12:55:00Z
6
value 0.00052
scoring_system epss
scoring_elements 0.16312
published_at 2026-04-09T12:55:00Z
7
value 0.00052
scoring_system epss
scoring_elements 0.16248
published_at 2026-04-08T12:55:00Z
8
value 0.00052
scoring_system epss
scoring_elements 0.16162
published_at 2026-04-07T12:55:00Z
9
value 0.00052
scoring_system epss
scoring_elements 0.16363
published_at 2026-04-04T12:55:00Z
10
value 0.00052
scoring_system epss
scoring_elements 0.16301
published_at 2026-04-02T12:55:00Z
url https://api.first.org/data/v1/epss?cve=CVE-2025-66412
2
reference_url https://github.com/angular/angular
reference_id
reference_type
scores
0
value 8.5
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://github.com/angular/angular
3
reference_url https://github.com/angular/angular/commit/1c6b0704fb63d051fab8acff84d076abfbc4893a
reference_id
reference_type
scores
0
value 8.5
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
1
value HIGH
scoring_system generic_textual
scoring_elements
2
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:N/T:P/P:M/B:A/M:M/D:T/2025-12-02T14:12:58Z/
url https://github.com/angular/angular/commit/1c6b0704fb63d051fab8acff84d076abfbc4893a
4
reference_url https://bugzilla.redhat.com/show_bug.cgi?id=2418155
reference_id 2418155
reference_type
scores
url https://bugzilla.redhat.com/show_bug.cgi?id=2418155
5
reference_url https://nvd.nist.gov/vuln/detail/CVE-2025-66412
reference_id CVE-2025-66412
reference_type
scores
0
value 8.5
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://nvd.nist.gov/vuln/detail/CVE-2025-66412
6
reference_url https://github.com/advisories/GHSA-v4hv-rgfq-gp49
reference_id GHSA-v4hv-rgfq-gp49
reference_type
scores
0
value HIGH
scoring_system cvssv3.1_qr
scoring_elements
url https://github.com/advisories/GHSA-v4hv-rgfq-gp49
7
reference_url https://github.com/angular/angular/security/advisories/GHSA-v4hv-rgfq-gp49
reference_id GHSA-v4hv-rgfq-gp49
reference_type
scores
0
value HIGH
scoring_system cvssv3.1_qr
scoring_elements
1
value 8.5
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
2
value HIGH
scoring_system generic_textual
scoring_elements
3
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:N/T:P/P:M/B:A/M:M/D:T/2025-12-02T14:12:58Z/
url https://github.com/angular/angular/security/advisories/GHSA-v4hv-rgfq-gp49
fixed_packages
0
url pkg:npm/%40angular/compiler@19.2.17
purl pkg:npm/%40angular/compiler@19.2.17
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-1j73-ybyt-p7hh
1
vulnerability VCID-ms76-c5dn-23hx
resource_url http://public2.vulnerablecode.io/packages/pkg:npm/%2540angular/compiler@19.2.17
1
url pkg:npm/%40angular/compiler@20.3.15
purl pkg:npm/%40angular/compiler@20.3.15
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-1j73-ybyt-p7hh
1
vulnerability VCID-ms76-c5dn-23hx
resource_url http://public2.vulnerablecode.io/packages/pkg:npm/%2540angular/compiler@20.3.15
2
url pkg:npm/%40angular/compiler@21.0.2
purl pkg:npm/%40angular/compiler@21.0.2
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-1j73-ybyt-p7hh
1
vulnerability VCID-ms76-c5dn-23hx
resource_url http://public2.vulnerablecode.io/packages/pkg:npm/%2540angular/compiler@21.0.2
aliases CVE-2025-66412, GHSA-v4hv-rgfq-gp49
risk_score 4.0
exploitability 0.5
weighted_severity 8.0
resource_url http://public2.vulnerablecode.io/vulnerabilities/VCID-3mrw-2h7j-zfdv
1
url VCID-ms76-c5dn-23hx
vulnerability_id VCID-ms76-c5dn-23hx
summary
Angular has XSS Vulnerability via Unsanitized SVG Script Attributes
A Cross-Site Scripting (XSS) vulnerability has been identified in the Angular Template Compiler. The vulnerability exists because Angular’s internal sanitization schema fails to recognize the `href` and `xlink:href` attributes of SVG `<script>` elements as a **Resource URL** context.

In a standard security model, attributes that can load and execute code (like a script's source) should be strictly validated. However, because the compiler does not classify these specific SVG attributes correctly, it allows attackers to bypass Angular's built-in security protections.

When template binding is used to assign user-controlled data to these attributes for example, `<script [attr.href]="userInput">` the compiler treats the value as a standard string or a non-sensitive URL rather than a resource link. This enables an attacker to provide a malicious payload, such as a `data:text/javascript` URI or a link to an external malicious script.

### Impact
When successfully exploited, this vulnerability allows for **arbitrary JavaScript execution** within the context of the victim's browser session. This can lead to:
- **Session Hijacking:** Stealing session cookies, localStorage data, or authentication tokens.
- **Data Exfiltration:** Accessing and transmitting sensitive information displayed within the application.
- **Unauthorized Actions:** Performing state-changing actions (like clicking buttons or submitting forms) on behalf of the authenticated user.

### Attack Preconditions

1. The victim application must explicitly use SVG `<script>` elements within its templates.
2. The application must use property or attribute binding (interpolation) for the `href` or `xlink:href` attributes of those SVG scripts.
3. The data bound to these attributes must be derived from an untrusted source (e.g., URL parameters, user-submitted database entries, or unsanitized API responses).

### Patches
- 19.2.18
- 20.3.16
- 21.0.7
- 21.1.0-rc.0

### Workarounds
Until the patch is applied, developers should:

- **Avoid Dynamic Bindings**: Do not use Angular template binding (e.g., `[attr.href]`) for SVG `<script>` elements.
- **Input Validation**: If dynamic values must be used, strictly validate the input against a strict allowlist of trusted URLs on the server side or before it reaches the template.

### Resources

- https://github.com/angular/angular/pull/66318
references
0
reference_url https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2026-22610.json
reference_id
reference_type
scores
0
value 7.3
scoring_system cvssv3
scoring_elements CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N
url https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2026-22610.json
1
reference_url https://api.first.org/data/v1/epss?cve=CVE-2026-22610
reference_id
reference_type
scores
0
value 0.00016
scoring_system epss
scoring_elements 0.0373
published_at 2026-04-21T12:55:00Z
1
value 0.00016
scoring_system epss
scoring_elements 0.03649
published_at 2026-04-02T12:55:00Z
2
value 0.00016
scoring_system epss
scoring_elements 0.03666
published_at 2026-04-04T12:55:00Z
3
value 0.00016
scoring_system epss
scoring_elements 0.03676
published_at 2026-04-07T12:55:00Z
4
value 0.00016
scoring_system epss
scoring_elements 0.03679
published_at 2026-04-08T12:55:00Z
5
value 0.00016
scoring_system epss
scoring_elements 0.03701
published_at 2026-04-09T12:55:00Z
6
value 0.00016
scoring_system epss
scoring_elements 0.03664
published_at 2026-04-11T12:55:00Z
7
value 0.00016
scoring_system epss
scoring_elements 0.0364
published_at 2026-04-12T12:55:00Z
8
value 0.00016
scoring_system epss
scoring_elements 0.03615
published_at 2026-04-13T12:55:00Z
9
value 0.00016
scoring_system epss
scoring_elements 0.03591
published_at 2026-04-16T12:55:00Z
10
value 0.00016
scoring_system epss
scoring_elements 0.03603
published_at 2026-04-18T12:55:00Z
url https://api.first.org/data/v1/epss?cve=CVE-2026-22610
2
reference_url https://github.com/angular/angular
reference_id
reference_type
scores
0
value 8.5
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://github.com/angular/angular
3
reference_url https://github.com/angular/angular/commit/91dc91bae4a1bbefc58bef6ef739d0e02ab44d56
reference_id
reference_type
scores
0
value 8.5
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
1
value HIGH
scoring_system generic_textual
scoring_elements
2
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:N/T:T/P:M/B:A/M:M/D:T/2026-01-12T17:29:54Z/
url https://github.com/angular/angular/commit/91dc91bae4a1bbefc58bef6ef739d0e02ab44d56
4
reference_url https://github.com/angular/angular/pull/66318
reference_id
reference_type
scores
0
value 8.5
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
1
value HIGH
scoring_system generic_textual
scoring_elements
2
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:N/T:T/P:M/B:A/M:M/D:T/2026-01-12T17:29:54Z/
url https://github.com/angular/angular/pull/66318
5
reference_url https://github.com/angular/angular/security/advisories/GHSA-jrmj-c5cx-3cw6
reference_id
reference_type
scores
0
value HIGH
scoring_system cvssv3.1_qr
scoring_elements
1
value 8.5
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
2
value HIGH
scoring_system generic_textual
scoring_elements
3
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:N/T:T/P:M/B:A/M:M/D:T/2026-01-12T17:29:54Z/
url https://github.com/angular/angular/security/advisories/GHSA-jrmj-c5cx-3cw6
6
reference_url https://nvd.nist.gov/vuln/detail/CVE-2026-22610
reference_id
reference_type
scores
0
value 8.5
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
1
value HIGH
scoring_system generic_textual
scoring_elements
url https://nvd.nist.gov/vuln/detail/CVE-2026-22610
7
reference_url https://bugzilla.redhat.com/show_bug.cgi?id=2428424
reference_id 2428424
reference_type
scores
url https://bugzilla.redhat.com/show_bug.cgi?id=2428424
8
reference_url https://github.com/advisories/GHSA-jrmj-c5cx-3cw6
reference_id GHSA-jrmj-c5cx-3cw6
reference_type
scores
0
value HIGH
scoring_system cvssv3.1_qr
scoring_elements
url https://github.com/advisories/GHSA-jrmj-c5cx-3cw6
fixed_packages
0
url pkg:npm/%40angular/compiler@19.2.18
purl pkg:npm/%40angular/compiler@19.2.18
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-1j73-ybyt-p7hh
resource_url http://public2.vulnerablecode.io/packages/pkg:npm/%2540angular/compiler@19.2.18
1
url pkg:npm/%40angular/compiler@20.3.16
purl pkg:npm/%40angular/compiler@20.3.16
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-1j73-ybyt-p7hh
resource_url http://public2.vulnerablecode.io/packages/pkg:npm/%2540angular/compiler@20.3.16
2
url pkg:npm/%40angular/compiler@21.0.7
purl pkg:npm/%40angular/compiler@21.0.7
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-1j73-ybyt-p7hh
resource_url http://public2.vulnerablecode.io/packages/pkg:npm/%2540angular/compiler@21.0.7
3
url pkg:npm/%40angular/compiler@21.1.0-rc.0
purl pkg:npm/%40angular/compiler@21.1.0-rc.0
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-1j73-ybyt-p7hh
resource_url http://public2.vulnerablecode.io/packages/pkg:npm/%2540angular/compiler@21.1.0-rc.0
aliases CVE-2026-22610, GHSA-jrmj-c5cx-3cw6
risk_score 4.0
exploitability 0.5
weighted_severity 8.0
resource_url http://public2.vulnerablecode.io/vulnerabilities/VCID-ms76-c5dn-23hx
Fixing_vulnerabilities
Risk_score4.0
Resource_urlhttp://public2.vulnerablecode.io/packages/pkg:npm/%2540angular/compiler@12.0.4