{"id":"CVE-2026-116566","kind":"vulnerability","aliases":["CVE-2026-116566"],"related":[],"title":"Python: socket.getaddrinfo silently truncates host and port with null bytes","description":"socket.getaddrinfo() previously accepted null bytes within *host* and *port* parameters which can cause the values to be silently truncated.","summary":"Python's socket.getaddrinfo() accepted null bytes inside the host and port arguments, which could cause those values to be silently cut short. The sources do not state what an attacker can do with a truncated hostname or port.","severity":"medium","cvss":5.3,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["python","runtime","server-side"],"not_affected_if":["no-untrusted-host-input"],"how_to_check":"- Check the installed Python version with `python3 --version` and compare it against the fixed releases in the Python security announcement.\n- Look for code that passes untrusted input into socket.getaddrinfo() or socket.create_connection().","fix":null,"status":"open","published_at":"2026-10-29T18:17:24+00:00","first_seen_at":"2026-10-29T18:26:33+00:00","triaged_at":"2026-10-29T18:28:46+00:00","updated_at":"2026-10-29T18:28:46+00:00","category":"runtime","confidence":0.5,"triage":{"at":"2026-10-29T18:28:46Z","model":"claude-haiku-5-5","output":{"fix":"unknown","reach":"unknown","title":"Python: socket.getaddrinfo silently truncates host and port with null bytes","impact":"low","summary":"Python's socket.getaddrinfo() accepted null bytes inside the host and port arguments, which could cause those values to be silently cut short. The sources do not state what an attacker can do with a truncated hostname or port.","audience":"developers","category":"runtime","nicknames":[],"who_cares":["python","server-side"],"confidence":0.5,"fix_status":"unknown","needs_auth":"unknown","worst_case":"unknown: truncated host or port may connect to an unintended destination","analyst_note":"Find the Python security-announce post and the affected and fixed version ranges, and confirm what a truncated host or port enables.","how_to_check":"- Check the installed Python version with `python3 --version` and compare it against the fixed releases in the Python security announcement.\n- Look for code that passes untrusted input into socket.getaddrinfo() or socket.create_connection().","plain_action":"","needs_analyst":true,"not_affected_if":["no-untrusted-host-input"],"who_is_affected":"Applications running a Python interpreter that passes externally supplied strings to socket.getaddrinfo(). The sources do not name affected version ranges or the exact consequence of truncation. Teams that only run fixed-input code paths are unlikely to be exposed.","user_interaction":"no","needs_special_setup":"unknown","severity_if_unknown":"unknown"},"cost_usd":0.00067,"input_tokens":4124,"output_tokens":516,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-116566':13A,16A '-2026':12A,15A 'accept':25B,62C 'argument':33B 'attack':51B 'byte':10A,27B,64C 'caus':36B,72C 'could':35B 'cut':42B 'cve':11A,14A 'host':5A,30B,66C 'hostnam':57B 'insid':28B 'null':9A,26B,63C 'paramet':69C 'port':7A,32B,59B,68C 'previous':61C 'python':1A,17B,22B 'runtim':18B 'server':20B 'server-sid':19B 'short':43B 'side':21B 'silent':3A,41B,77C 'socket.getaddrinfo':2A,24B,60C 'sourc':45B 'state':48B 'truncat':4A,56B,78C 'valu':38B,74C 'within':65C","nicknames":[],"mitigations":[],"who_affected":"Applications running a Python interpreter that passes externally supplied strings to socket.getaddrinfo(). The sources do not name affected version ranges or the exact consequence of truncation. Teams that only run fixed-input code paths are unlikely to be exposed.","tier":"C","verified":{},"analyst_revisit_at":null,"fix_status":"none","audience":"developers","plain_action":null,"first_public_at":"2026-10-29T17:46:30+00:00","kev":null,"cvss_vector":"CVSS:4.0/AV:A/AC:L/AT:P/PR:H/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_by":"cna@python.org","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-116566","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-116566","severity":null,"published_at":"2026-10-29T18:17:24+00:00","modified_at":"2026-10-29T18:17:24+00:00","first_seen_at":"2026-10-29T18:26:33+00:00","fetched_at":"2026-10-29T18:26:33+00:00","note":null}],"documents":[{"id":18399,"url":"https://mail.python.org/archives/list/security-announce@python.org/message/HCHE62VYTPYI6WOPJQDWUBR4CINBPSM7/","title":"Python security-announce: [Security-announce][CVE-2026-116566] socket.getaddrinfo() accepts embedded null bytes in host and port","kind":"advisory","source":"advisory","publisher":null,"text":"[Security-announce][CVE-2026-116566] socket.getaddrinfo() accepts embedded null bytes in host and port\n\nThere is a MEDIUM severity vulnerability affecting CPython. socket.getaddrinfo() previously accepted null bytes within *host* and *port* parameters which can cause the values to be silently truncated. Please see the linked CVE ID for the latest information on affected versions: * https://www.cve.org/CVERecord?id=CVE-2026-116566 * https://github.com/python/cpython/pull/160899","published_at":"2026-10-29T17:46:30+00:00","relation":"advisory","confidence":null,"note":null}],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}