/

CVE-2026-44726

Severity:

HIGH RISK

(7.4)

Cleartext TLS Fallback (CWE-319) in Deno Node Layer

CVE-2026-44726

Analyzed

Vulnerability type

Category:

Cleartext Transmission of Sensitive Information

CWE:

CWE-319

Impact:

Exposure of supposedly TLS-protected application traffic

Severity:

HIGH RISK

(7.4)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A flaw in Deno's Node.js TLS compatibility layer can cause a client to send application data in cleartext after a connection retry, even though the application expects TLS.

When a network condition triggers the autoSelectFamily retry, the replacement TCP connection may never be upgraded to TLS, allowing an on-path attacker to observe or modify traffic the client believes is encrypted.

Affected context

This vulnerability appears in Deno applications that:

  • Use the Node.js-compatible tls layer or modules relying on it
  • Enable autoSelectFamily for connection handling
  • Perform connection retries across address families (e.g., IPv4/IPv6) under failure conditions

It becomes relevant in environments where a network intermediary or misconfiguration can force the first address-family attempt to fail, causing the client to transparently retry over a new TCP connection that might never be upgraded to TLS.

Exploit preconditions

  • Attack surface: Client-side TLS connections made through Deno's Node.js compatibility layer.
  • Required access: Ability for an attacker to position themselves on the network path (on-path/Man-in-the-Middle) and influence connectivity (e.g., dropping IPv6 traffic on dual-stack hosts).
  • Trigger point: The initial address-family connection attempt must fail while autoSelectFamily is enabled, causing a retry over a new TCP socket.
  • Why exploitation is possible: The socket reinitialization path reuses a stale TLS upgrade hook bound to the original, failed handle, so the new TCP connection never completes the TLS handshake before application data is written and sent in plaintext.

Why this happens

At its core, the issue stems from incorrect state management in the TLS upgrade logic during socket reinitialization. When autoSelectFamily is enabled and the first connection attempt fails, the system creates a new TCP socket but continues to rely on a TLS upgrade hook associated with the now-invalid original socket.

This broken lifecycle management means the replacement connection bypasses the expected TLS handshake, mapping directly to CWE-319: Cleartext Transmission of Sensitive Information, where data assumed to be protected is instead sent without cryptographic safeguards.

Potential impact

  • Network attackers may read application-layer data that was expected to be encrypted.
  • Attackers could tamper with or inject messages into the connection before the client detects any anomaly.
  • Sensitive information such as credentials, session tokens, or API payloads can be exposed in transit.
  • Application protocols relying on TLS for integrity and confidentiality may be downgraded, enabling broader compromise.

General mitigation guidance

Effective mitigation patterns focus on ensuring that connection retries cannot bypass the security handshake and that transport security state is tied to the actual socket in use:

  • Use connection management logic that rebinds TLS upgrade hooks to the current, live socket and validates that a full TLS handshake has completed before allowing application writes.
  • Introduce explicit checks that prevent sending application data until a secure-connect signal from the active transport channel is observed, rather than relying on legacy or cached state.
  • Design client connection abstractions so that address-family fallbacks and other retries cannot silently change the security properties of the underlying connection.
  • Apply defense-in-depth by minimizing sensitive data in early client requests and using protocol-level safeguards (e.g., application-layer authentication and integrity checks) even over TLS.

How teams detect issues like this

To detect similar vulnerabilities, teams can:

  • Use static analysis to flag patterns where TLS state or event hooks are stored and reused across socket lifecycles without explicit rebinding or verification.
  • Conduct code reviews focused on connection retry logic, ensuring that every new transport instance re-enters a clear handshake state before application traffic is permitted.
  • Employ runtime testing and chaos experiments that intentionally break initial connections (e.g., selectively dropping IPv6) and verify that retries retain full TLS protection.
  • Integrate automated security checks into CI/CD pipelines that validate assumptions about encryption at the protocol level, such as inspecting test traffic captures for unexpected plaintext.

Sources

SourceLink
github.comgithub.com/denoland/deno/security/advisories/GHSA-chqv-56wv-7564

Frequently asked

questions

No. It affects specific retry paths where autoSelectFamily is enabled and the first address-family attempt fails. In those cases, the replacement TCP connection may carry data in plaintext, while other connections behave as expected.

An attacker must be on-path or able to manipulate network conditions, such as dropping traffic for one address family. Mere remote internet access without network positioning is generally insufficient.

Ensure that any new socket created during connection retries is treated as a fresh transport, with TLS upgrade logic and secure-connect events bound to that instance. Application code should not send data until the active connection has conclusively completed its TLS handshake.

Model transport security state explicitly, tying encryption guarantees to the actual connection object rather than inferred events. Combine rigorous code review of retry and fallback logic with automated tests that simulate partial failures, verifying that encryption is always established before data transmission.

Find out what's already
exploitable in your codebase.