CVE-2025-66035
Angular is Vulnerable to XSRF Token Leakage via Protocol-Relative URLs in Angular HTTP Client
Description
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
- The victim's Angular application must have XSRF protection enabled.
- 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.
Affected Maven artifacts (2)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.mvnpm.at.angular » commonvia npm @angular/common | < 19.2.16>= 20.0.0-next.0, < 20.3.14>= 21.0.0-next.0, < 21.0.1 | 19.2.16, 20.3.14, 21.0.1 |
| org.webjars.npm » angular__commonvia npm @angular/common | < 19.2.16>= 20.0.0-next.0, < 20.3.14>= 21.0.0-next.0, < 21.0.1 | 19.2.16, 20.3.14, 21.0.1 |
Blast radius
35% of the dependent artifacts (7) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 294 |
| 2 hops | 9 |
| 3 hops | 9 |
Most used dependents
- org.mvnpm.at.angular » platform-browser10 usages
- org.mvnpm.at.angular » forms5 usages
- org.mvnpm.at.angular » router4 usages
- org.mvnpm.at.angular » platform-browser-dynamic3 usages
- org.mvnpm.at.angular » animations2 usages
- org.fujion » fujion-angular-core2 usages
- org.fujion » fujion-angular-example1 usages
- org.fujion » fujion-testharness0 usages
- org.webjars.npm » github-com-ng-bootstrap-ng-bootstrap0 usages
- org.webjars.npm » ng2-datetime0 usages
- org.webjars.npm » ng2-datetime-picker0 usages
- org.webjars.npm » github-com-angular-material20 usages
- org.mvnpm » a2ui0 usages
- org.webjars.npm » angular2-fontawesome0 usages
- org.webjars.npm » github-com-mseemann-angular2-mdl0 usages
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
Other ecosystems
Also affects npm (1 package) . See all on OSV
References
| Advisory | NVD CVE-2025-66035 | nvd.nist.gov |
| Package | angular/angular | github.com |
| Web | angular/angular advisory GHSA-58c5-g7wp-6w37 | github.com |
| Web | angular/angular commit 0276479 | github.com |
| Web | angular/angular commit 05fe668 | github.com |
| Web | angular/angular commit 3240d85 | github.com |
| Web | productcert/html/ssa-253495.html | cert-portal.siemens.com |
| Web | productcert/html/ssa-485750.html | cert-portal.siemens.com |
| Web | angular/angular release 19.2.16 | github.com |
| Web | angular/angular release 20.3.14 | github.com |
| Web | angular/angular release 21.0.1 | github.com |
