Skip to content

CVE-2023-40217: Bypass TLS handshake on closed sockets #108310

Description

@ambv

Bug report

Originally reported by @aapooksman via the Python Security Response Team mailing list on 2023-08-08. Thanks for the responsible disclosure!

Checklist

  • I am confident this is a bug in CPython, not a bug in a third-party project
  • I have searched the CPython issue tracker,
    and am confident this bug has not been reported before

CPython versions tested on:

3.8, 3.9, 3.10, 3.11, 3.12, CPython main branch

Operating systems tested on:

Linux, macOS

A clear and concise description of the bug:

Instances of ssl.SSLSocket are vulnerable to a bypass of the TLS handshake and included protections (like certificate verification) and could lead applications to treat unencrypted data received pre-TLS-handshake that is followed by an immediate connection close as if it were post-handshake TLS encrypted data.

Linked PRs

Activity

  1. added 7 commits that reference this issue on Aug 22, 2023
  2. changed the title [-]Placeholder issue[/-] [+]CVE-2023-40217: Bypass TLS handshake on closed sockets[/+] on Aug 22, 2023
  3. 38 remaining items

  4. Byefsaneahmet commented on Sep 8, 2023

    @Byefsaneahmet
  5. Byefsaneahmet commented on Sep 8, 2023

    @Byefsaneahmet
  6. hugovk commented on Sep 8, 2023

    @hugovk
    Member

    I've reported @Byefsaneahmet to GitHub for disruption.

  7. added 3 commits that reference this issue on Oct 11, 2023
  8. added a commit that references this issue on Oct 11, 2023
  9. bastien-roucaries commented on Nov 1, 2023

    @bastien-roucaries

    Hi I have difficulty to port this to python3.5 it fail async io test... Can I get nsome help from upstream ?

  10. vstinner commented on Nov 1, 2023

    @vstinner
    Member

    @mcepl: Maybe you backported this change to 3.5 for OpenSUSE?

  11. bastien-roucaries commented on Nov 1, 2023

    @bastien-roucaries
  12. mcepl commented on Nov 1, 2023

    @mcepl
    Contributor
  13. added a commit that references this issue on Jan 17, 2024
  14. added a commit that references this issue on Apr 4, 2024
  15. added a commit that references this issue on May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

3.10 (EOL)end of life3.11only security fixes3.12only security fixes3.13only security fixes3.8 (EOL)end of life3.9 (EOL)end of lifetype-bugAn unexpected behavior, bug, or errortype-securityA security issue

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions