{"id":"CVE-2026-49859","aliases":["CVE-2026-49859","GHSA-cpgj-f7g3-2pp2"],"related":[],"kind":"vulnerability","state":"published","title":"Deno: `fetch()` API sandbox bypass via missing DNS resolution check","summary":"Deno is a JavaScript, TypeScript, and WebAssembly runtime. Prior to 2.8.1, when fetch() was called, Deno checked the destination hostname against --deny-net rules but did not re-check the IP addresses that hostname resolved to. An attacker-controlled script could use a specially crafted domain name that passes the hostname check yet resolves to a denied IP, bypassing the network restriction entirely. This vulnerability is fixed in 2.8.1.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Deno is a JavaScript, TypeScript, and WebAssembly runtime. Prior to 2.8.1, when fetch() was called, Deno checked the destination hostname against --deny-net rules but did not re-check the IP addresses that hostname resolved to. An attacker-controlled script could use a specially crafted domain name that passes the hostname check yet resolves to a denied IP, bypassing the network restriction entirely. This vulnerability is fixed in 2.8.1.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nWhen `fetch()` was called, Deno checked the destination hostname against\n`--deny-net` rules but did not re-check the IP addresses that hostname\nresolved to. An attacker-controlled script could use a specially crafted domain\nname that passes the hostname check yet resolves to a denied IP, bypassing the\nnetwork restriction entirely.\n\n## Impact\n\nCode running under `--deny-net` could reach hosts that the user intended to\nblock. In practice this means network isolation rules — for example, blocking\naccess to `localhost` or internal services — could be silently circumvented by\na malicious or compromised dependency.\n\nA companion advisory covers the same class of issue in the WebSocket API.\n\n## Who is affected\n\nUsers who:\n\n- run untrusted or third-party code with `deno run`, and\n- rely on `--deny-net` to restrict which hosts that code can reach.\n\nIf you do not use `--deny-net`, or if you only run fully trusted code, you are\nnot affected.\n\n## Workaround\n\nNo workaround is available short of upgrading. If upgrading immediately is not\npossible, avoid granting `--allow-net` to untrusted code that also has\n`--deny-net` restrictions you depend on for security.\n\n## Fix\n\nThe `fetch()` DNS resolver now performs a post-resolution check on every IP\naddress before passing it to the HTTP connector, consistent with how\n`Deno.connect` already behaved.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Deno es un entorno de ejecución de JavaScript, TypeScript y WebAssembly. Antes de la versión 2.8.1, cuando se llamaba a fetch(), Deno verificaba el nombre de host de destino contra las reglas --deny-net, pero no volvía a verificar las direcciones IP a las que se resolvía ese nombre de host. Un script controlado por un atacante podría usar un nombre de dominio especialmente diseñado que pase la verificación del nombre de host, pero que se resuelva a una IP denegada, eludiendo por completo la restricción de red. Esta vulnerabilidad está corregida en la versión 2.8.1.","source":"nvd"}],"published":"2026-06-16T19:02:55.000Z","modified":"2026-10-25T23:10:00.167Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N","score":5.2,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N","score":5.2,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N","score":5.2,"rating":"MEDIUM"}],"cwes":["CWE-693","CWE-918"],"affected":[{"ranges":[{"version":"< 2.8.1","status":"affected"}],"vendor":"denoland","product":"deno","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.8.1"}],"ecosystem":"crates.io","package":"deno","purl":"pkg:cargo/deno","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2.8.1"}],"vendor":"deno","product":"deno","cpe":"cpe:2.3:a:deno:deno:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/denoland/deno/security/advisories/GHSA-cpgj-f7g3-2pp2","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-49859","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":"partial","date":"2026-06-24T14:22:56.623Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-49859","url":"https://www.cve.org/CVERecord?id=CVE-2026-49859","licence":"CVE Terms of Use","modified":"2026-06-24T14:23:09.068Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-cpgj-f7g3-2pp2","url":"https://github.com/advisories/GHSA-cpgj-f7g3-2pp2","licence":"CC-BY-4.0","modified":"2026-07-20T21:15:27.259Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-49859","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-49859","licence":"Public domain","modified":"2026-10-25T23:10:00.167Z"}],"updatedAt":"2026-11-25T22:59:25.500Z","epss":{"score":0.00101,"percentile":0.00937,"date":"2026-12-01T12:00:22.000Z"}}