Skip to content
Heist/ feed
Back to feed
MediumFix available

@angular/common: XSRF Token Leakage via URL Parsing Discrepancy in Angular HTTP Client (Incomplete fix for CVE-2025-66035)

Type: advisorySources: OSV

An incomplete fix for [GHSA-58c5-g7wp-6w37](https://github.com/angular/angular/security/advisories/GHSA-58c5-g7wp-6w37) (`CVE-2025-66035`) in `@angular/common`'s HTTP Client (`HttpClient`) allows Cross-Site Request Forgery (XSRF) tokens to be leaked to attacker-controlled cross-origin domains when requests use URLs that exploit parsing discrepancies between regular expressions and the browser's WHATWG URL parser. ### Technical Description To address `CVE-2025-66035`, `xsrfInterceptorFn` introduced a regular expression (`const ABSOLUTE_URL_REGEX = /^(?:https?:)?\/\//i`) to detect and skip absolute and protocol-relative URLs before attaching the `X-XSRF-TOKEN` header. However, browsers resolve request URLs passed to `fetch()` and `XMLHttpRequest.open()` using the **WHATWG URL parser**. For `http:` and `https:` schemes, the WHATWG URL standard performs several normalizations prior to resolving the authority/origin: * Backslashes (`\`) are treated as forward slashes (`/`) — e.g., `/\evil.example/x`, `\\evil.example/x`, `\/evil.example/x`, `https:\\evil.example/x`, `https:/\evil.example/x`. * Leading and trailing C0 control characters and spaces (`<= 0x20`) are stripped — e.g., `' //evil.example/x'`, `'\0//evil.example/x'`, `'\x1f//evil.example/x'`. * ASCII tab (`\t`), newline (`\n`), and carriage return (`\r`) characters are removed anywhere in the input — e.g., `'/\t/evil.example/x'`, `'/\n/evil.example/x'`, `'htt\tps://evil.example/x'`. Because these URLs do not match `/^(?:htt

Products
@angular/common
Affected versions
Not specified
Fixed versions
20.3.34, 21.0.3
CVEs
CVE-2026-111753
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 13:25 UTC · Revision 1

Source evidence

@angular/common: XSRF Token Leakage via URL Parsing Discrepancy in Angular HTTP Client (Incomplete fix for CVE-2025-66035)

core-osv · Original source

Published 20 Oct 2026, 20:37 UTC

An incomplete fix for [GHSA-58c5-g7wp-6w37](https://github.com/angular/angular/security/advisories/GHSA-58c5-g7wp-6w37) (`CVE-2025-66035`) in `@angular/common`'s HTTP Client (`HttpClient`) allows Cross-Site Request Forgery (XSRF) tokens to be leaked to attacker-controlled cross-origin domains when requests use URLs that exploit parsing discrepancies between regular expressions and the browser's WHATWG URL parser. ### Technical Description To address `CVE-2025-66035`, `xsrfInterceptorFn` introduced a regular expression (`const ABSOLUTE_URL_REGEX = /^(?:https?:)?\/\//i`) to detect and skip absolute and protocol-relative URLs before attaching the `X-XSRF-TOKEN` header. However, browsers resolve request URLs passed to `fetch()` and `XMLHttpRequest.open()` using the **WHATWG URL parser**. For `http:` and `https:` schemes, the WHATWG URL standard performs several normalizations prior to resolving the authority/origin: * Backslashes (`\`) are treated as forward slashes (`/`) — e.g., `/\evil.example/x`, `\\evil.example/x`, `\/evil.example/x`, `https:\\evil.example/x`, `https:/\evil.example/x`. * Leading and trailing C0 control characters and spaces (`<= 0x20`) are stripped — e.g., `' //evil.example/x'`, `'\0//evil.example/x'`, `'\x1f//evil.example/x'`. * ASCII tab (`\t`), newline (`\n`), and carriage return (`\r`) characters are removed anywhere in the input — e.g., `'/\t/evil.example/x'`, `'/\n/evil.example/x'`, `'htt\tps://evil.example/x'`. Because these URLs do not match `/^(?:htt

osv:GHSA-jfgx-762w-99vr

@angular/common

Fixed versions: 21.0.3

@angular/common

Fixed versions: 20.3.34

@angular/common

Fixed versions: Not specified

Complete source record
{
  "id": "a37be61bc9b0403326f5ff8e8e9dc06e89a8581f19b5b52398a74dad63de5244",
  "url": "https://osv.dev/vulnerability/GHSA-jfgx-762w-99vr",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "@angular/common: XSRF Token Leakage via URL Parsing Discrepancy in Angular HTTP Client (Incomplete fix for CVE-2025-66035)",
    "summary": "An incomplete fix for [GHSA-58c5-g7wp-6w37](https://github.com/angular/angular/security/advisories/GHSA-58c5-g7wp-6w37) (`CVE-2025-66035`) in `@angular/common`'s HTTP Client (`HttpClient`) allows Cross-Site Request Forgery (XSRF) tokens to be leaked to attacker-controlled cross-origin domains when requests use URLs that exploit parsing discrepancies between regular expressions and the browser's WHATWG URL parser. ### Technical Description To address `CVE-2025-66035`, `xsrfInterceptorFn` introduced a regular expression (`const ABSOLUTE_URL_REGEX = /^(?:https?:)?\\/\\//i`) to detect and skip absolute and protocol-relative URLs before attaching the `X-XSRF-TOKEN` header. However, browsers resolve request URLs passed to `fetch()` and `XMLHttpRequest.open()` using the **WHATWG URL parser**. For `http:` and `https:` schemes, the WHATWG URL standard performs several normalizations prior to resolving the authority/origin: * Backslashes (`\\`) are treated as forward slashes (`/`) — e.g., `/\\evil.example/x`, `\\\\evil.example/x`, `\\/evil.example/x`, `https:\\\\evil.example/x`, `https:/\\evil.example/x`. * Leading and trailing C0 control characters and spaces (`<= 0x20`) are stripped — e.g., `' //evil.example/x'`, `'\\0//evil.example/x'`, `'\\x1f//evil.example/x'`. * ASCII tab (`\\t`), newline (`\\n`), and carriage return (`\\r`) characters are removed anywhere in the input — e.g., `'/\\t/evil.example/x'`, `'/\\n/evil.example/x'`, `'htt\\tps://evil.example/x'`. Because these URLs do not match `/^(?:htt",
    "evidence": "osv:GHSA-jfgx-762w-99vr",
    "products": [
      {
        "name": {
          "value": "@angular/common",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "21.0.3",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "@angular/common",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "20.3.34",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "@angular/common",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": []
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "GHSA-jfgx-762w-99vr",
      "aliases": [
        "CVE-2026-111753",
        "GHSA-jfgx-762w-99vr"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "21.0.0"
                },
                {
                  "fixed": "21.0.3"
                }
              ]
            }
          ],
          "package": {
            "name": "@angular/common",
            "purl": "pkg:npm/%40angular/common",
            "ecosystem": "npm"
          },
          "database_specific": {
            "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-jfgx-762w-99vr/GHSA-jfgx-762w-99vr.json"
          }
        },
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "20.0.0"
                },
                {
                  "fixed": "20.3.34"
                }
              ]
            }
          ],
          "package": {
            "name": "@angular/common",
            "purl": "pkg:npm/%40angular/common",
            "ecosystem": "npm"
          },
          "database_specific": {
            "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-jfgx-762w-99vr/GHSA-jfgx-762w-99vr.json"
          }
        },
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "last_affected": "19.2.25"
                }
              ]
            }
          ],
          "package": {
            "name": "@angular/common",
            "purl": "pkg:npm/%40angular/common",
            "ecosystem": "npm"
          },
          "database_specific": {
            "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-jfgx-762w-99vr/GHSA-jfgx-762w-99vr.json"
          }
        }
      ],
      "modified": "2026-10-20T20:45:05.952939259Z",
      "provider": "osv",
      "references": [
        "https://github.com/angular/angular/security/advisories/GHSA-jfgx-762w-99vr",
        "https://github.com/angular/angular/pull/65683",
        "https://github.com/angular/angular/pull/71295",
        "https://github.com/angular/angular/commit/0659d11c854c9c6b886a2e925afef98d70bb005f",
        "https://github.com/angular/angular/commit/20474d3f0fd7c64071add6e84acf720627e5c19b",
        "https://github.com/angular/angular/commit/933ce817d53e25926844fa56af8230816763d08e",
        "https://github.com/angular/angular"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-201",
          "CWE-359"
        ],
        "severity": "MODERATE",
        "github_reviewed": true,
        "nvd_published_at": null,
        "github_reviewed_at": "2026-10-20T20:37:57Z"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-111753",
        "evidence": "/aliases"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 390692,
  "published_at": "2026-10-20T20:37:57+00:00"
}