<?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/" xmlns:webfeeds="http://webfeeds.org/rss/1.0"><channel><title>Dart - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/dart/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Thu, 15 Oct 2026 22:24:13 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/dart/feed.xml" rel="self" type="application/rss+xml"/><image><url>https://feed.craftedsignal.io/favicon-32x32.png</url><title>CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/</link><width>32</width><height>32</height></image><webfeeds:icon>https://feed.craftedsignal.io/favicon.svg</webfeeds:icon><item><title>Sensitive Header Leak in dio_http2_adapter via Cross-Origin Redirects</title><link>https://feed.craftedsignal.io/briefs/2026-10-dio-http2-adapter-leak/</link><pubDate>Thu, 15 Oct 2026 22:24:13 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-10-dio-http2-adapter-leak/</guid><description>The dio_http2_adapter library fails to sanitize Authorization, Cookie, and Proxy-Authorization headers when following cross-origin HTTP redirects, enabling credential theft.</description><content:encoded><![CDATA[<p>The <code>dio_http2_adapter</code> library, a plugin for the popular Dart <code>Dio</code> HTTP client, contains a vulnerability that leads to sensitive information disclosure. When the library is configured to follow HTTP redirects (which is enabled by default with a limit of 5), the adapter fails to perform origin validation before re-issuing a request to a new location. Consequently, sensitive request headers, specifically <code>Authorization</code>, <code>Cookie</code>, and <code>Proxy-Authorization</code>, are copied verbatim into the request sent to the redirect target, even if that target is on a completely different origin.</p>
<p>This behavior essentially allows any malicious or compromised server that can trigger a <code>3xx</code> redirect to force the client to disclose authenticated session tokens or proxy credentials. The vulnerability resides in the <code>_fetch</code> method of the <code>Http2Adapter</code> class, where header maps are preserved during the <code>copyWith</code> operation without sanitization. This flaw impacts server-side Dart applications, mobile applications, and CLI tools utilizing <code>dio_http2_adapter</code> for authenticated HTTP/2 communications.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The victim application initiates an authenticated request using <code>Dio</code> with <code>Http2Adapter</code>, including sensitive headers like <code>Authorization</code> or <code>Cookie</code>.</li>
<li>The application contacts a malicious or compromised origin server that is under the attacker's control.</li>
<li>The malicious server responds with an HTTP <code>302 Found</code> (or other <code>3xx</code> status) and a <code>Location</code> header pointing to an attacker-controlled URI.</li>
<li>The <code>Http2Adapter</code> processes the <code>3xx</code> response, parsing the <code>Location</code> header to determine the new redirect target.</li>
<li>The adapter calls <code>options.copyWith</code> to initiate the new request to the redirect URI, inadvertently cloning the full original header map into the new request options.</li>
<li>No cross-origin check is performed to see if the new URI belongs to a different authority.</li>
<li>The <code>_fetch</code> method emits the new HTTP/2 request, now including the sensitive <code>Authorization</code> and <code>Cookie</code> headers, to the attacker-controlled server.</li>
<li>The attacker logs the incoming request headers at the final destination, successfully exfiltrating the victim's credentials.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows for the unauthorized disclosure of sensitive credentials, including bearer tokens, session identifiers, and proxy authentication details. This enables attackers to impersonate the victim in subsequent requests to the original legitimate service. Given the prevalence of <code>Dio</code> in the Dart and Flutter ecosystems, any application using <code>dio_http2_adapter</code> with <code>followRedirects</code> enabled is at risk. The lack of authentication required to perform the redirect makes this a low-complexity attack for any adversary who can intercept or host an HTTP-based service.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Immediately upgrade or patch the <code>dio_http2_adapter</code> library logic to implement origin validation during redirect processing.</li>
<li>For immediate mitigation, define a list of sensitive headers (e.g., <code>Authorization</code>, <code>Cookie</code>, <code>Proxy-Authorization</code>) and manually remove these headers from the <code>RequestOptions</code> when the redirect URI differs from the original request authority.</li>
<li>Developers should ensure that their <code>Dio</code> configurations explicitly manage redirect behavior if full library updates are delayed, though this does not replace the need for the library-level sanitization fix.</li>
<li>Organizations deploying Dart-based CLI tools or backend services should audit internal codebases to confirm if <code>dio_http2_adapter</code> is utilized for authenticated requests to untrusted or external endpoints.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>information-disclosure</category><category>credential-access</category><category>dart</category><category>flutter</category></item></channel></rss>