CVE-2026-116566

socket.getaddrinfo() accepts embedded null bytes in host and port

Published Oct 29, 2026 CVSS 4.0 · 5.3 Medium EPSS < 1% KEV · Not listed
Description
socket.getaddrinfo() previously accepted null bytes within *host* and *port* parameters which can cause the values to be silently truncated.

Analysis

AI-generated

Technical impact

The flaw in CPython’s socket.getaddrinfo function allows null bytes embedded within host and port parameters, causing those strings to be silently truncated. This results in the function resolving a different host name or port than intended, potentially directing a program to connect to an unintended destination. The weakness is linked to insufficient input validation and improper string handling, categorized as CWE‑140 and CWE‑158.

Affected Systems

The vulnerability affects Python Software Foundation’s CPython implementation of the Python language. All releases prior to the official patch that rejects embedded null bytes are vulnerable; no specific version identifiers are listed, so any CPython installation not yet updated is considered at risk.

Risk and Exploitability

The CVSS score of 5.3 indicates a moderate severity, while the EPSS score of less than 1% suggests a very low but nonzero exploitation probability. The vulnerability is not included in CISA’s KEV catalog. The likely attack vector requires an entity that can supply crafted host or port strings to the application—such as user input or an attacker-controlled configuration. When provided, the erroneous resolution can redirect traffic, potentially exposing data or enabling malicious interactions.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade CPython to a version that rejects embedded null bytes in socket.getaddrinfo()
  • Validate or sanitize host and port strings in application code to reject or remove null bytes before they reach socket.getaddrinfo()
  • Monitor Python release notes and the security mailing list for updates addressing this issue

Generated by OpenCVE AI on November 6, 2026 at 02:36 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-140
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N'}

threat_severity

Moderate

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Python
Python cpython
Python Software Foundation
Python Software Foundation cpython
Vendors & Products Python
Python cpython
Python Software Foundation
Python Software Foundation cpython
Type Values Removed Values Added
Description socket.getaddrinfo() previously accepted null bytes within *host* and *port* parameters which can cause the values to be silently truncated.
Title socket.getaddrinfo() accepts embedded null bytes in host and port
Weaknesses CWE-158
References
Metrics cvssV4_0

{'score': 5.3, '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'}

Weaknesses
  • CWE-140

    Improper Neutralization of Delimiters

  • CWE-158

    Improper Neutralization of Null Byte or NUL Character

Sources

Status
PUBLISHED
Assigner
PSF
Published
Updated
Oct 30, 2026, 5:18 PM
Reserved
Oct 26, 2026, 3:00 PM
Status
Awaiting Analysis
Published
Oct 29, 2026, 6:17 PM
Modified
Oct 30, 2026, 6:17 PM
Severity
Moderate
Public date
Oct 29, 2026, 5:45 PM