<?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>Undici (&gt;= 8.0.0, &lt; 8.5.0) - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/undici--8.0.0--8.5.0/</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, 18 Jun 2026 14:51:27 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/undici--8.0.0--8.5.0/feed.xml" rel="self" type="application/rss+xml"/><item><title>undici TLS Validation Bypass via SOCKS5 ProxyAgent (CVE-2026-9697)</title><link>https://feed.craftedsignal.io/briefs/2026-06-undici-tls-bypass/</link><pubDate>Thu, 18 Jun 2026 14:51:27 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-06-undici-tls-bypass/</guid><description>A vulnerability in undici's ProxyAgent, when configured with a SOCKS5 proxy, causes the `requestTls` option to be silently dropped. This bypasses user-configured TLS certificate validation settings (e.g., custom CAs), allowing HTTPS connections through the SOCKS5 tunnel to fall back to the Node.js default trust store. This flaw enables Man-in-the-Middle (MITM) attacks, where any publicly-trusted certificate for the target hostname would be accepted, compromising the intended certificate pinning and allowing attackers to read or tamper with HTTPS traffic.</description><content:encoded><![CDATA[<p>The <code>undici</code> HTTP/1.1 client for Node.js, specifically its <code>ProxyAgent</code> component, is affected by CVE-2026-9697, a critical TLS certificate validation bypass vulnerability. This flaw, introduced in <code>undici</code> versions 7.23.0 and 8.0.0, occurs when the <code>ProxyAgent</code> is configured to use a SOCKS5 proxy. In such scenarios, the <code>requestTls</code> option, intended for strict TLS validation (e.g., pinning to internal CAs or custom certificates), is silently ignored. As a result, HTTPS connections established through the SOCKS5 tunnel default to Node.js's standard trust store. This allows an attacker, capable of performing a Man-in-the-Middle (MITM) attack, to present any valid certificate signed by a publicly trusted Certificate Authority, thereby bypassing the application's intended certificate pinning and enabling the interception and potential manipulation of encrypted traffic. Defenders should prioritize patching and reassess network configurations involving <code>undici</code> and SOCKS5 proxies.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li><strong>Initial Access (Attacker Pre-condition):</strong> An attacker establishes a Man-in-the-Middle (MITM) position, enabling them to intercept network traffic between a vulnerable Node.js application and its target HTTPS server (e.g., via DNS poisoning, rogue Wi-Fi, compromised network infrastructure, or controlling the SOCKS5 proxy itself).</li>
<li><strong>Vulnerable Application Execution:</strong> A Node.js application, utilizing <code>undici</code>'s <code>ProxyAgent</code> (or <code>Socks5ProxyAgent</code> directly) with a SOCKS5 proxy URI (e.g., <code>socks5://proxy.attacker.com</code>), attempts to establish an HTTPS connection to a target server, while being configured to enforce strict TLS validation via the <code>requestTls</code> option (e.g., pinning to a custom Certificate Authority).</li>
<li><strong>TLS Option Dropped:</strong> Due to the vulnerability (CVE-2026-9697), <code>undici</code>'s <code>ProxyAgent</code> silently disregards the <code>requestTls</code> configuration (including <code>ca</code>, <code>cert</code>, <code>key</code>, <code>rejectUnauthorized</code>, <code>servername</code>) that was specified for the outgoing HTTPS connection.</li>
<li><strong>Fallback to Default Trust Store:</strong> The vulnerable application proceeds to establish the HTTPS connection, but instead of using the application's defined <code>requestTls</code> settings, it defaults to Node.js's standard trust store (typically the Mozilla CA bundle) for validating the target server's certificate.</li>
<li><strong>Attacker Certificate Presentation:</strong> The attacker, from their MITM vantage point, intercepts the TLS handshake and presents a valid HTTPS certificate for the target hostname, which is signed by <em>any</em> publicly trusted Certificate Authority.</li>
<li><strong>Certificate Acceptance and MITM:</strong> The vulnerable application, now relying on the default trust store, accepts the attacker's certificate as legitimate because it is signed by a publicly trusted CA. This bypasses the application's intended strict TLS pinning and validation.</li>
<li><strong>Data Interception and Tampering:</strong> The attacker can now transparently decrypt, inspect, modify, and re-encrypt the HTTPS traffic flowing between the vulnerable Node.js application and the legitimate target server, allowing for full Man-in-the-Middle capabilities.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>The impact of CVE-2026-9697 is severe for applications relying on <code>undici</code>'s <code>ProxyAgent</code> with SOCKS5 proxies for secure HTTPS communication, especially those implementing certificate pinning or custom CA trust. If exploited, an attacker positioned in a Man-in-the-Middle (MITM) role can completely bypass intended TLS security controls. This allows them to intercept sensitive data transmitted over HTTPS, including credentials, personal identifiable information (PII), and proprietary business data. Furthermore, the attacker can tamper with this data, potentially leading to unauthorized transactions, data corruption, or execution of malicious commands within the application's context. While specific victim counts are not available, any organization using affected <code>undici</code> versions in conjunction with SOCKS5 proxies for critical application-to-application communication is at risk.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li><strong>Upgrade undici immediately:</strong> Upgrade affected Node.js applications to <code>undici</code> v7.28.0 or v8.5.0 to remediate CVE-2026-9697.</li>
<li><strong>Deploy package version detection:</strong> Deploy the provided Sigma rule &quot;Detect Vulnerable undici Package Versions (CVE-2026-9697)&quot; to identify affected systems within your environment.</li>
<li><strong>Implement workaround if upgrade isn't possible:</strong> If an immediate upgrade is not feasible, reconfigure <code>ProxyAgent</code> to route traffic through an HTTP-proxy instead of SOCKS5 when <code>requestTls</code> is required for strict validation, as <code>requestTls</code> is honored correctly for HTTP proxies.</li>
<li><strong>Monitor for Node.js SOCKS5 usage:</strong> Deploy the &quot;Detect Node.js Process Initiating SOCKS5 Proxy Connection&quot; Sigma rule to identify Node.js applications potentially using SOCKS5 proxies, which may indicate vulnerable configurations if combined with <code>undici</code>.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>vulnerability</category><category>tls-bypass</category><category>node.js</category><category>npm</category></item></channel></rss>