CVE-2026-49336: CWE-178: Improper Handling of Case Sensitivity in microsoft kiota-typescript
@microsoft/kiota-http-fetchlibrary provides TypeScript libraries for Kiota-generated API clients. In versions 1.0.0-preview.97 through 1.0.0-preview.101, `@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. Version 1.0.0-preview.102 patches the issue.
AI Analysis
Technical Summary
@microsoft/kiota-http-fetchlibrary's RedirectHandler is intended to remove Authorization and Cookie headers on cross-origin redirects to prevent leaking sensitive tokens. However, in versions 1.0.0-preview.97 through 1.0.0-preview.101, the default scrubSensitiveHeaders callback deletes headers using case-sensitive keys (Authorization, Cookie) on a headers object whose keys have already been lower-cased by FetchRequestAdapter.getRequestFromRequestInformation. This results in no headers being removed, causing sensitive Authorization and Cookie headers to be sent to attacker-controlled hosts during redirects. This vulnerability is present in the default middleware chain and affects all kiota-generated TypeScript SDKs that use authentication providers setting the Authorization header. Version 1.0.0-preview.102 includes a fix for this issue.
Potential Impact
Sensitive authentication headers such as Bearer tokens and Cookies can be unintentionally forwarded to attacker-controlled hosts during cross-origin HTTP redirects. This can lead to unauthorized access or token leakage. The vulnerability affects all kiota-generated TypeScript SDKs using the affected versions of @microsoft/kiota-http-fetchlibrary and authentication providers that set the Authorization header. There are no known exploits in the wild at this time.
Mitigation Recommendations
Upgrade to @microsoft/kiota-http-fetchlibrary version 1.0.0-preview.102 or later, where the issue is patched. Until upgraded, be aware that the default middleware does not properly strip sensitive headers on redirects, so consider implementing custom middleware to correctly handle header scrubbing or avoid using affected versions in sensitive environments. Patch status is not explicitly confirmed in the vendor advisory, but the description states version 1.0.0-preview.102 patches the issue.
CVE-2026-49336: CWE-178: Improper Handling of Case Sensitivity in microsoft kiota-typescript
Description
@microsoft/kiota-http-fetchlibrary provides TypeScript libraries for Kiota-generated API clients. In versions 1.0.0-preview.97 through 1.0.0-preview.101, `@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. Version 1.0.0-preview.102 patches the issue.
CVSS v4.0
Score 5.5medium
Affected software
pkg:npm/@microsoft/kiota-http-fetchlibraryRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
@microsoft/kiota-http-fetchlibrary's RedirectHandler is intended to remove Authorization and Cookie headers on cross-origin redirects to prevent leaking sensitive tokens. However, in versions 1.0.0-preview.97 through 1.0.0-preview.101, the default scrubSensitiveHeaders callback deletes headers using case-sensitive keys (Authorization, Cookie) on a headers object whose keys have already been lower-cased by FetchRequestAdapter.getRequestFromRequestInformation. This results in no headers being removed, causing sensitive Authorization and Cookie headers to be sent to attacker-controlled hosts during redirects. This vulnerability is present in the default middleware chain and affects all kiota-generated TypeScript SDKs that use authentication providers setting the Authorization header. Version 1.0.0-preview.102 includes a fix for this issue.
Potential Impact
Sensitive authentication headers such as Bearer tokens and Cookies can be unintentionally forwarded to attacker-controlled hosts during cross-origin HTTP redirects. This can lead to unauthorized access or token leakage. The vulnerability affects all kiota-generated TypeScript SDKs using the affected versions of @microsoft/kiota-http-fetchlibrary and authentication providers that set the Authorization header. There are no known exploits in the wild at this time.
Mitigation Recommendations
Upgrade to @microsoft/kiota-http-fetchlibrary version 1.0.0-preview.102 or later, where the issue is patched. Until upgraded, be aware that the default middleware does not properly strip sensitive headers on redirects, so consider implementing custom middleware to correctly handle header scrubbing or avoid using affected versions in sensitive environments. Patch status is not explicitly confirmed in the vendor advisory, but the description states version 1.0.0-preview.102 patches the issue.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-05-29T14:35:45.902Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a358c5cf198dc38c1f2fbba
Added to database: 06/19/2026, 18:37:16 UTC
Last enriched: 06/26/2026, 19:22:31 UTC
Last updated: 08/01/2026, 07:18:01 UTC
Views: 93
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.