GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Null bytes are accepted within `socket.getaddrinfo()` · Issue #160898 · python/cpython

Null bytes are accepted within socket.getaddrinfo() #160898

New issue
Copy link
New issue
Copy link
Open
Open
Null bytes are accepted within socket.getaddrinfo()#160898
Copy link
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtopic-socketRelated to the socket, socketserver and selectors modulesRelated to the socket, socketserver and selectors modulestype-securityA security issueA security issue

Description

@sethmlarson
sethmlarson
opened on Oct 29, 2026
Issue body actions

Bug report

Most socket APIs don't accept null bytes, but socket.getaddrinfo() does which can lead to unexpected truncation.

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

  • gh-160898: Reject null bytes in socket.getaddrinfo() host and port #160899
  • [3.15] gh-160898: Reject null bytes in socket.getaddrinfo() host and port (GH-160899) #160925
  • [3.14] gh-160898: Reject null bytes in socket.getaddrinfo() host and port (GH-160899) #160926
  • [3.13] gh-160898: Reject null bytes in socket.getaddrinfo() host and port (GH-160899) #160974
  • [3.12] gh-160898: Reject null bytes in socket.getaddrinfo() host and port (GH-160899) #160975
  • [3.11] gh-160898: Reject null bytes in socket.getaddrinfo() host and port (GH-160899) #160977

Activity

  1. sethmlarson
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    type-securityA security issueA security issue
    topic-socketRelated to the socket, socketserver and selectors modulesRelated to the socket, socketserver and selectors modules
    on Oct 29, 2026
  2. StanFromIreland
    added
    extension-modulesC modules in the Modules dirC modules in the Modules dir
    and removed
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Oct 29, 2026
  3. StanFromIreland
    added a commit that references this issue on Oct 29, 2026

    gh-160898: Reject null bytes in `socket.getaddrinfo()` host and port (#…

    131a3a6
  4. Anurag-S1ngh commented on Oct 31, 2026

    @Anurag-S1ngh
    Anurag-S1ngh
    on Oct 31, 2026 · Hidden as low-quality
    show commentMore actions
  5. hugovk
    added 2 commits that reference this issue on Nov 6, 2026

    [3.15] gh-160898: Reject null bytes in `socket.getaddrinfo()` host an…

    85736ac

    [3.14] gh-160898: Reject null bytes in `socket.getaddrinfo()` host an…

    71a0b04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    extension-modulesC modules in the Modules dirC modules in the Modules dirtopic-socketRelated to the socket, socketserver and selectors modulesRelated to the socket, socketserver and selectors modulestype-securityA security issueA security issue

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.