Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. @microsoft/kiota-http-fetchlibrary
  4. ›
  5. CVE-2026-49336

CVE-2026-49336: @microsoft/kiota-http-fetchlibrary: Bearer token and Cookie leak across origin on redirect due to case-mismatched scrub in fetchRequestAdapter

June 26, 2026

@microsoft/kiota-http-fetchlibrary’s RedirectHandler is documented as stripping Authorization and Cookie from cross-origin redirect targets, but the default scrubSensitiveHeaders callback in RedirectHandlerOptions uses case-sensitive property deletion (delete headers.Authorization, delete headers.Cookie) on a headers object that FetchRequestAdapter.getRequestFromRequestInformation has already lower-cased. The delete therefore targets keys that do not exist, the scrub is a no-op, and any Bearer token or Cookie attached by a kiota-generated SDK is forwarded to an attacker-controlled host across a 30x redirect.

This is reachable in the default middleware chain (MiddlewareFactory.getDefaultMiddlewares) with no custom configuration, and applies to every kiota-generated TypeScript SDK that uses BaseBearerTokenAuthenticationProvider or any other authentication provider that sets the Authorization request header.

References

  • github.com/advisories/GHSA-396q-4vc8-28x9
  • github.com/microsoft/kiota-typescript/commit/09f8bd9b34d68bf412a9b78f6ca7e7961ef14974
  • github.com/microsoft/kiota-typescript/security/advisories/GHSA-396q-4vc8-28x9
  • nvd.nist.gov/vuln/detail/CVE-2026-49336

Code Behaviors & Features

Detect and mitigate CVE-2026-49336 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 1.0.0-preview.97 before 1.0.0-preview.102

Fixed versions

  • 1.0.0-preview.102

Solution

Upgrade to version 1.0.0-preview.102 or above.

Impact 5.3 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-178: Improper Handling of Case Sensitivity
  • CWE-200: Exposure of Sensitive Information to an Unauthorized Actor

Source file

npm/@microsoft/kiota-http-fetchlibrary/CVE-2026-49336.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Thu, 16 Jul 2026 00:18:24 +0000.