<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Kiota-Typescript — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/kiota-typescript/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata — refreshed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Tue, 09 Jan 2024 10:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/kiota-typescript/feed.xml" rel="self" type="application/rss+xml"/><item><title>Kiota RedirectHandler Leaks Sensitive Headers on Cross-Origin Redirects</title><link>https://feed.craftedsignal.io/briefs/2024-01-09-kiota-redirect-header-leak/</link><pubDate>Tue, 09 Jan 2024 10:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-09-kiota-redirect-header-leak/</guid><description>The RedirectHandler middleware in multiple Kiota libraries fails to strip sensitive HTTP headers (Cookie, Proxy-Authorization, and custom headers) when following 3xx redirects to a different host or scheme, potentially leading to session hijacking, corporate proxy credential theft, and API key theft.</description><content:encoded><![CDATA[<p>The RedirectHandler middleware in Kiota libraries, specifically microsoft-kiota-http-okHttp v1.9.0 for Java, contains a vulnerability where sensitive HTTP headers are not stripped when following 3xx redirects to a different host or scheme. This affects multiple Kiota libraries, including those for .NET, Java, Python, TypeScript, and Go. The vulnerability resides within the <code>getRedirect</code> method of the <code>RedirectHandler</code> class, where only the Authorization header is removed, while Cookie, Proxy-Authorization, and custom headers are inadvertently forwarded. This is the default middleware used when creating Kiota HTTP clients via <code>KiotaClientFactory.create()</code> in Java. Defenders should be aware of potential session hijacking, proxy credential theft, and API key compromise if their applications utilize vulnerable Kiota libraries. The vulnerability was introduced in versions prior to the fixes listed below.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker identifies a trusted API endpoint that is using a vulnerable Kiota library.</li>
<li>The attacker crafts a malicious request to the trusted API endpoint designed to trigger a 3xx redirect. This could be achieved through techniques like open redirect vulnerabilities, man-in-the-middle (MITM) attacks, or DNS rebinding.</li>
<li>The trusted API endpoint, upon receiving the malicious request, generates a 302 redirect response, pointing to a malicious attacker-controlled server.</li>
<li>The vulnerable Kiota RedirectHandler processes the redirect response, failing to remove the Cookie, Proxy-Authorization, and custom headers from the original request.</li>
<li>Kiota constructs a new HTTP request to the attacker-controlled server, including the victim&rsquo;s sensitive headers.</li>
<li>The victim&rsquo;s browser or application sends the new request, with the leaked headers, to the attacker&rsquo;s server.</li>
<li>The attacker&rsquo;s server captures the sensitive headers, including session cookies, proxy credentials, and API keys.</li>
<li>The attacker uses the captured credentials for malicious purposes, such as session hijacking or unauthorized API access.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability can lead to severe consequences, including session hijacking, corporate proxy credential theft, and API key compromise. An attacker capturing session cookies can impersonate a user, gaining unauthorized access to their account and sensitive data. Leaked proxy credentials can allow the attacker to bypass security controls and access internal resources. Exposed API keys grant the attacker the ability to make unauthorized calls to APIs, potentially exfiltrating data or disrupting services. All consumers of kiota-java are affected, including Microsoft Graph SDK for Java.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade to the latest versions of the affected Kiota libraries to include the patch for CVE-2026-44503.</li>
<li>For Java, upgrade <code>com.microsoft.kiota:microsoft-kiota-abstractions</code> to version 1.9.1 or later.</li>
<li>For .NET, upgrade <code>Microsoft.Kiota.Abstractions</code> to version 1.22.0 or later.</li>
<li>For Python, upgrade <code>microsoft-kiota-http</code> to version 1.9.9 or later.</li>
<li>For TypeScript, upgrade <code>kiota-typescript</code> to version 1.0.0-preview.100 or later.</li>
<li>For Go, upgrade <code>github.com/microsoft/kiota-http-go</code> to version 1.5.5 or later.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>header-injection</category><category>credential-access</category><category>cloud</category></item></channel></rss>