Loading...
Skip to main content

CVE-2025-66035 — Vulnerability in @angular/common — CVE Details

HIGH

Angular is Vulnerable to XSRF Token Leakage via Protocol-Relative URLs in Angular HTTP Client

Published November 26, 2025Updated September 10, 2026Source: osv

Summary

The vulnerability is a **Credential Leak by App Logic** that leads to the **unauthorized disclosure of the Cross-Site Request Forgery (XSRF) token** to an attacker-controlled domain. Angular's HttpClient has a built-in XSRF protection mechanism that works by checking if a request URL starts with a protocol (`http://` or `https://`) to determine if it is cross-origin. If the URL starts with protocol-relative URL (`//`), it is incorrectly treated as a same-origin request, and the XSRF token is automatically added to the `X-XSRF-TOKEN` header. ### Impact The token leakage completely bypasses Angular's built-in CSRF protection, allowing an attacker to capture the user's valid XSRF token. Once the token is obtained, the attacker can perform arbitrary Cross-Site Request Forgery (CSRF) attacks against the victim user's session. ### Attack Preconditions 1. The victim's Angular application must have **XSRF protection enabled**. 2. The attacker must be able to make the application send a state-changing HTTP request (e.g., `POST`) to a **protocol-relative URL** (e.g., `//attacker.com`) that they control. ### Patches - 19.2.16 - 20.3.14 - 21.0.1 ### Workarounds Developers should avoid using protocol-relative URLs (URLs starting with `//`) in HttpClient requests. All backend communication URLs should be hardcoded as relative paths (starting with a single `/`) or fully qualified, trusted absolute URLs.

Advisory Timeline

  • First published November 26, 2025 (320 days ago).
  • Last revised September 10, 2026 — 287 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

npm
Update @angular/common to 21.0.1 or later
npm install @angular/common@21.0.1
npm
Update @angular/common to 19.2.16 or later
npm install @angular/common@19.2.16
npm
Update @angular/common to 20.3.14 or later
npm install @angular/common@20.3.14

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (3)

Affects 1 ecosystem: npm (1).

PackageEcosystemAffectedFixed In
@angular/common
npm
All versions21.0.1
@angular/common
npm
All versions19.2.16
@angular/common
npm
All versions20.3.14

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 8.6 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
—
Confidentiality
—
Integrity
—
Availability
—

CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:N/SA:N

Frequently Asked Questions

What is CVE-2025-66035?
Angular is Vulnerable to XSRF Token Leakage via Protocol-Relative URLs in Angular HTTP Client This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.6/10).
How do I check if my project is affected by CVE-2025-66035?
CVE-2025-66035 affects @angular/common. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2025-66035 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
8.6

High exploitability or significant impact. Prioritize remediation within days.

Also Known As

GHSA-58c5-g7wp-6w37

Related CVEs

  • CVE-2026-41423
    HIGH

    Angular: SSRF via protocol-relative and backslash URLs in Angular Platform-Server

  • CVE-2026-88056
    HIGH

    Angular: SSRF and Cross-Origin Credential Disclosure via URL Resolution Discrepancy in SSR

  • CVE-2026-32635
    HIGH

    Angular vulnerable to XSS in i18n attribute bindings

  • CVE-2026-50556
    HIGH

    @angular/platform-server: Missing `<noscript>` Raw-Text Serialization Escaping leads to Cross-Site Scripting (XSS) in Angular SSR

  • CVE-2026-88058
    HIGH

    Angular SSR: XSS via Unescaped Processing Instruction (<?...?>) Nodes in Fallback Raw-Content Elements

  • CVE-2026-68945
    HIGH

    Angular: Cache-Key Ambiguity in HttpTransferCache Leading to Cross-Request Response Reuse and State Poisoning

  • CVE-2026-69151
    HIGH

    Angular i18n: Cross-Site Scripting (XSS) via event-handler attributes

  • CVE-2026-22610
    HIGH

    Angular has XSS Vulnerability via Unsanitized SVG Script Attributes

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies