Skip to content
OpenAdvisories
Medium · 6.5 CVE-2024-5642 EUVD-2024-46822GHSA-hrvr-7x5w-xpmq

Buffer overread when using an empty list with SSLContext.set_npn_protocols()

Published Jun 27, 2024 · Updated Jul 31, 2026 · Assigned by PSF

Description

CPython 3.9 and earlier doesn't disallow configuring an empty list ("[]") for SSLContext.set_npn_protocols() which is an invalid value for the underlying OpenSSL API. This results in a buffer over-read when NPN is used (see CVE-2024-5535 for OpenSSL). This vulnerability is of low severity due to NPN being not widely used and specifying an empty list likely being uncommon in-practice (typically a protocol name would be configured).

Affected products

VendorProductAffectedFixed
Python Software Foundation CPython < 3.9.24, 3.10.0a1 – < 3.10.0b1 3.9.24

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 pypy3 7.3.10+dfsg-1 —
Debian 13 pypy3 7.3.10+dfsg-1 —
Debian 12 pypy3 7.3.10+dfsg-1 —
ReleasePackageFixed inAdvisory
Ubuntu Pro 22.04 LTS python2.7 No fix yet —
Ubuntu Pro 20.04 LTS python2.7 +1 No fix yet —
Ubuntu Pro 18.04 LTS python2.7 No fix yet —
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 16.04 LTS python2.7 +1 No fix yet —
Ubuntu Pro 14.04 LTS python2.7 +2 No fix yet —
ReleasePackageFixed inAdvisory
RHEL 9 python3 +8 3.9.25-2.el9_7 RHSA-2025:23342
RHEL 8 Cython +1 0.29.21-5.module+el8.9.0+19644+d68f775d RHSA-2025:23530
RHEL 8 PyYAML +1 5.4.1-1.module+el8.9.0+19644+d68f775d RHSA-2025:23530
RHEL 8 mod_wsgi +1 4.7.1-7.module+el8.10.0+23075+0aa18782.1 RHSA-2025:23530
RHEL 8 numpy +3 1.19.4-3.module+el8.9.0+19644+d68f775d RHSA-2025:23530
RHEL 8 pybind11 +2 2.7.1-1.module+el8.9.0+19644+d68f775d RHSA-2025:23530
RHEL 8 pytest +1 6.0.2-2.module+el8.9.0+19644+d68f775d RHSA-2025:23530
RHEL 8 python-PyMySQL +1 0.10.1-2.module+el8.9.0+19644+d68f775d RHSA-2025:23530
RHEL 8 python-attrs +1 20.3.0-2.module+el8.9.0+19644+d68f775d RHSA-2025:23530
RHEL 8 python-cffi +1 1.14.3-2.module+el8.9.0+19644+d68f775d RHSA-2025:23530
RHEL 8 python-chardet +1 3.0.4-19.module+el8.9.0+19644+d68f775d RHSA-2025:23530
RHEL 8 python-cryptography +1 3.3.1-3.module+el8.10.0+21271+eccd1d86 RHSA-2025:23530
RHEL 8 python-idna +1 2.10-4.module+el8.10.0+21815+bb024982 RHSA-2025:23530
RHEL 8 python-iniconfig +1 1.1.1-2.module+el8.9.0+19644+d68f775d RHSA-2025:23530
RHEL 8 python-lxml +1 4.6.5-1.module+el8.9.0+19644+d68f775d RHSA-2025:23530
RHEL 8 python-more-itertools +1 8.5.0-2.module+el8.9.0+19644+d68f775d RHSA-2025:23530
RHEL 8 python-packaging +1 20.4-4.module+el8.9.0+19644+d68f775d RHSA-2025:23530
RHEL 8 python-pluggy +1 0.13.1-3.module+el8.9.0+19644+d68f775d RHSA-2025:23530
RHEL 8 python-ply +1 3.11-10.module+el8.9.0+19644+d68f775d RHSA-2025:23530
RHEL 8 python-psutil +1 5.8.0-4.module+el8.9.0+19644+d68f775d RHSA-2025:23530
RHEL 8 python-psycopg2 +3 2.8.6-3.module+el8.10.0+21142+453d2b75 RHSA-2025:23530
RHEL 8 python-py +1 1.10.0-1.module+el8.9.0+19644+d68f775d RHSA-2025:23530
RHEL 8 python-pycparser +1 2.20-3.module+el8.9.0+19644+d68f775d RHSA-2025:23530
RHEL 8 python-pysocks +1 1.7.1-4.module+el8.9.0+19644+d68f775d RHSA-2025:23530
RHEL 8 python-requests +1 2.25.0-3.module+el8.9.0+19644+d68f775d RHSA-2025:23530
RHEL 8 python-toml +1 0.10.1-5.module+el8.9.0+19644+d68f775d RHSA-2025:23530
RHEL 8 python-urllib3 +1 1.25.10-5.module+el8.10.0+20443+f0a692fe RHSA-2025:23530
RHEL 8 python-wcwidth +1 0.2.5-3.module+el8.9.0+19644+d68f775d RHSA-2025:23530
RHEL 8 python-wheel +2 1:0.35.1-4.module+el8.9.0+19644+d68f775d RHSA-2025:23530
RHEL 8 python39 +7 3.9.25-2.module+el8.10.0+23718+1842ae33 RHSA-2025:23530
RHEL 8 python39-pip +2 20.2.4-9.module+el8.10.0+21329+8d76b841 RHSA-2025:23530
RHEL 8 python39-pyparsing +1 2.4.7-5.module+el8.9.0+19644+d68f775d RHSA-2025:23530
RHEL 8 python39-setuptools +2 50.3.2-7.module+el8.10.0+23406+03055bfb RHSA-2025:23530
RHEL 8 python39-six +1 1.15.0-3.module+el8.9.0+19644+d68f775d RHSA-2025:23530
RHEL 8 scipy +1 1.5.4-5.module+el8.9.0+19644+d68f775d RHSA-2025:23530

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 9 python3 +7 3.9.25-2.el9_7 ALSA-2025:23342
AlmaLinux 8 python39 +7 3.9.25-2.module_el8.10.0+4083+53cad1fb ALSA-2025:23530
AlmaLinux 8 python39-Cython 0.29.21-5.module_el8.6.0+2780+a40f65e1 ALSA-2025:23530
AlmaLinux 8 python39-PyMySQL 0.10.1-2.module_el8.6.0+2780+a40f65e1 ALSA-2025:23530
AlmaLinux 8 python39-attrs 20.3.0-2.module_el8.6.0+2780+a40f65e1 ALSA-2025:23530
AlmaLinux 8 python39-cffi 1.14.3-2.module_el8.6.0+2780+a40f65e1 ALSA-2025:23530
AlmaLinux 8 python39-chardet 3.0.4-19.module_el8.6.0+2780+a40f65e1 ALSA-2025:23530
AlmaLinux 8 python39-cryptography 3.3.1-3.module_el8.10.0+3765+2f9a457d ALSA-2025:23530
AlmaLinux 8 python39-idna 2.10-4.module_el8.10.0+3849+a48d89aa ALSA-2025:23530
AlmaLinux 8 python39-iniconfig 1.1.1-2.module_el8.6.0+2780+a40f65e1 ALSA-2025:23530
AlmaLinux 8 python39-lxml 4.6.5-1.module_el8.6.0+2780+a40f65e1 ALSA-2025:23530
AlmaLinux 8 python39-mod_wsgi 4.7.1-7.module_el8.10.0+3989+a618fe15.1 ALSA-2025:23530
AlmaLinux 8 python39-more-itertools 8.5.0-2.module_el8.6.0+2780+a40f65e1 ALSA-2025:23530
AlmaLinux 8 python39-numpy +2 1.19.4-3.module_el8.6.0+2780+a40f65e1 ALSA-2025:23530
AlmaLinux 8 python39-packaging 20.4-4.module_el8.6.0+2780+a40f65e1 ALSA-2025:23530
AlmaLinux 8 python39-pip +1 20.2.4-9.module_el8.10.0+3765+2f9a457d ALSA-2025:23530
AlmaLinux 8 python39-pluggy 0.13.1-3.module_el8.6.0+2780+a40f65e1 ALSA-2025:23530
AlmaLinux 8 python39-ply 3.11-10.module_el8.6.0+2780+a40f65e1 ALSA-2025:23530
AlmaLinux 8 python39-psutil 5.8.0-4.module_el8.6.0+2780+a40f65e1 ALSA-2025:23530
AlmaLinux 8 python39-psycopg2 +2 2.8.6-3.module_el8.10.0+3765+2f9a457d ALSA-2025:23530
AlmaLinux 8 python39-py 1.10.0-1.module_el8.6.0+2780+a40f65e1 ALSA-2025:23530
AlmaLinux 8 python39-pybind11 +1 2.7.1-1.module_el8.6.0+2780+a40f65e1 ALSA-2025:23530
AlmaLinux 8 python39-pycparser 2.20-3.module_el8.6.0+2780+a40f65e1 ALSA-2025:23530
AlmaLinux 8 python39-pyparsing 2.4.7-5.module_el8.6.0+2780+a40f65e1 ALSA-2025:23530
AlmaLinux 8 python39-pysocks 1.7.1-4.module_el8.6.0+2780+a40f65e1 ALSA-2025:23530
AlmaLinux 8 python39-pytest 6.0.2-2.module_el8.6.0+2780+a40f65e1 ALSA-2025:23530
AlmaLinux 8 python39-pyyaml 5.4.1-1.module_el8.6.0+2780+a40f65e1 ALSA-2025:23530
AlmaLinux 8 python39-requests 2.25.0-3.module_el8.9.0+3634+fb2a896c ALSA-2025:23530
AlmaLinux 8 python39-scipy 1.5.4-5.module_el8.9.0+3634+fb2a896c ALSA-2025:23530
AlmaLinux 8 python39-setuptools +1 50.3.2-7.module_el8.10.0+4040+9207bbc0 ALSA-2025:23530
AlmaLinux 8 python39-six 1.15.0-3.module_el8.6.0+2780+a40f65e1 ALSA-2025:23530
AlmaLinux 8 python39-toml 0.10.1-5.module_el8.6.0+2780+a40f65e1 ALSA-2025:23530
AlmaLinux 8 python39-urllib3 1.25.10-5.module_el8.10.0+3765+2f9a457d ALSA-2025:23530
AlmaLinux 8 python39-wcwidth 0.2.5-3.module_el8.6.0+2780+a40f65e1 ALSA-2025:23530
AlmaLinux 8 python39-wheel +1 1:0.35.1-4.module_el8.6.0+2780+a40f65e1 ALSA-2025:23530

Rocky Linux

Errata ↗
ReleasePackageFixed inAdvisory
Rocky Linux 9 python3.9 3.9.25-2.el9_7 RLSA-2025:23342
Rocky Linux 8 Cython 0.29.21-5.module+el8.10.0+1582+bc278001 RLSA-2025:23530
Rocky Linux 8 PyYAML 5.4.1-1.module+el8.9.0+1418+f0d66789 RLSA-2025:23530
Rocky Linux 8 mod_wsgi 4.7.1-7.module+el8.10.0+1582+bc278001 RLSA-2025:23530
Rocky Linux 8 numpy 1.19.4-3.module+el8.10.0+1582+bc278001 RLSA-2025:23530
Rocky Linux 8 pybind11 2.7.1-1.module+el8.9.0+1357+a3b80af7 RLSA-2025:23530
Rocky Linux 8 pytest 6.0.2-2.module+el8.10.0+1582+bc278001 RLSA-2025:23530
Rocky Linux 8 python-PyMySQL 0.10.1-2.module+el8.10.0+1582+bc278001 RLSA-2025:23530
Rocky Linux 8 python-attrs 20.3.0-2.module+el8.10.0+1582+bc278001 RLSA-2025:23530
Rocky Linux 8 python-cffi 1.14.3-2.module+el8.10.0+1582+bc278001 RLSA-2025:23530
Rocky Linux 8 python-chardet 3.0.4-19.module+el8.9.0+1418+f0d66789 RLSA-2025:23530
Rocky Linux 8 python-cryptography 3.3.1-3.module+el8.10.0+1697+7e517775 RLSA-2025:23530
Rocky Linux 8 python-idna 2.10-4.module+el8.10.0+1809+41195054 RLSA-2025:23530
Rocky Linux 8 python-iniconfig 1.1.1-2.module+el8.9.0+1332+dd574197 RLSA-2025:23530
Rocky Linux 8 python-lxml 4.6.5-1.module+el8.10.0+1582+bc278001 RLSA-2025:23530
Rocky Linux 8 python-more-itertools 8.5.0-2.module+el8.10.0+1582+bc278001 RLSA-2025:23530
Rocky Linux 8 python-packaging 20.4-4.module+el8.10.0+1582+bc278001 RLSA-2025:23530
Rocky Linux 8 python-pluggy 0.13.1-3.module+el8.10.0+1582+bc278001 RLSA-2025:23530
Rocky Linux 8 python-ply 3.11-10.module+el8.9.0+1418+f0d66789 RLSA-2025:23530
Rocky Linux 8 python-psutil 5.8.0-4.module+el8.9.0+1357+a3b80af7 RLSA-2025:23530
Rocky Linux 8 python-psycopg2 2.8.6-3.module+el8.10.0+1660+b5b6f004 RLSA-2025:23530
Rocky Linux 8 python-py 1.10.0-1.module+el8.10.0+1582+bc278001 RLSA-2025:23530
Rocky Linux 8 python-pycparser 2.20-3.module+el8.10.0+1582+bc278001 RLSA-2025:23530
Rocky Linux 8 python-pysocks 1.7.1-4.module+el8.9.0+1418+f0d66789 RLSA-2025:23530
Rocky Linux 8 python-requests 2.25.0-3.module+el8.10.0+1582+bc278001 RLSA-2025:23530
Rocky Linux 8 python-toml 0.10.1-5.module+el8.9.0+1332+dd574197 RLSA-2025:23530
Rocky Linux 8 python-urllib3 1.25.10-5.module+el8.10.0+1545+03246da9 RLSA-2025:23530
Rocky Linux 8 python-wcwidth 0.2.5-3.module+el8.10.0+1582+bc278001 RLSA-2025:23530
Rocky Linux 8 python-wheel 1:0.35.1-4.module+el8.10.0+1582+bc278001 RLSA-2025:23530
Rocky Linux 8 python3x-pip 20.2.4-9.module+el8.10.0+1721+e52d6351 RLSA-2025:23530
Rocky Linux 8 python3x-pyparsing 2.4.7-5.module+el8.10.0+1582+bc278001 RLSA-2025:23530
Rocky Linux 8 python3x-setuptools 50.3.2-7.module+el8.10.0+2057+30213a2b RLSA-2025:23530
Rocky Linux 8 python3x-six 1.15.0-3.module+el8.10.0+1582+bc278001 RLSA-2025:23530
Rocky Linux 8 scipy 1.5.4-5.module+el8.10.0+1582+bc278001 RLSA-2025:23530
ReleasePackageFixed inAdvisory
SLES 15 SP6 python3 +1 3.6.15-150300.10.72.1 SUSE-SU-2024:3470-1
SLES 15 SP5 python3 +1 3.6.15-150300.10.72.1 SUSE-SU-2024:3470-1
SLES 15 SP5 python39 +1 3.9.19-150300.4.49.1 SUSE-SU-2024:3076-1
SLES 15 SP4 python3 +1 3.6.15-150300.10.72.1 SUSE-SU-2024:3470-1
SLES 15 SP3 python3 +1 3.6.15-150300.10.72.1 SUSE-SU-2024:3470-1
SLES 15 SP3 python39 +1 3.9.19-150300.4.49.1 SUSE-SU-2024:3076-1
SLES 12 SP5 python36 +1 3.6.15-64.1 SUSE-SU-2024:3353-1
Show 13 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 15 SP4 python3 +1 3.6.15-150300.10.72.1 SUSE-SU-2024:3470-1
SLES for SAP 15 SP3 python3 +1 3.6.15-150300.10.72.1 SUSE-SU-2024:3470-1
SLES for SAP 15 SP3 python39 +1 3.9.19-150300.4.49.1 SUSE-SU-2024:3076-1
SLES for SAP 12 SP5 python36 +1 3.6.15-64.1 SUSE-SU-2024:3353-1
SLE Micro 5.5 python3 +1 3.6.15-150300.10.72.1 SUSE-SU-2024:3470-1
SLE Micro 5.4 python3 +1 3.6.15-150300.10.72.1 SUSE-SU-2024:3470-1
SLE Micro 5.3 python3 +1 3.6.15-150300.10.72.1 SUSE-SU-2024:3470-1
SLE Micro 5.2 python3 +1 3.6.15-150300.10.72.1 SUSE-SU-2024:3470-1
SLE Micro 5.1 python3 +1 3.6.15-150000.3.158.1 SUSE-SU-2024:3351-1
SLE HPC 15 SP4 python3 +1 3.6.15-150300.10.72.1 SUSE-SU-2024:3470-1
SLE HPC 15 SP3 python3 +1 3.6.15-150300.10.72.1 SUSE-SU-2024:3470-1
SLE HPC 15 SP3 python39 +1 3.9.19-150300.4.49.1 SUSE-SU-2024:3076-1
SUSE Manager Server 4.3 python3 +1 3.6.15-150300.10.72.1 SUSE-SU-2024:3470-1
SUSE Manager Proxy 4.3 python3 +1 3.6.15-150300.10.72.1 SUSE-SU-2024:3470-1
SUSE Enterprise Storage 7.1 python3 +1 3.6.15-150300.10.72.1 SUSE-SU-2024:3470-1
SUSE Enterprise Storage 7.1 python39 +1 3.9.19-150300.4.49.1 SUSE-SU-2024:3076-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed python38 3.8.19-7.1 openSUSE-SU-2024:14256-1
openSUSE Tumbleweed python39 3.9.19-6.1 openSUSE-SU-2024:14253-1
openSUSE Leap 15.6 python3 +2 3.6.15-150300.10.72.1 SUSE-SU-2024:3470-1
openSUSE Leap 15.6 python39 +2 3.9.19-150300.4.49.1 SUSE-SU-2024:3076-1
openSUSE Leap 15.5 python3 +2 3.6.15-150300.10.72.1 SUSE-SU-2024:3470-1
openSUSE Leap 15.5 python39 +2 3.9.19-150300.4.49.1 SUSE-SU-2024:3076-1
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
openSUSE Leap Micro 5.5 python3 +1 3.6.15-150300.10.72.1 SUSE-SU-2024:3470-1

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2 python +6 2.7.18-1.amzn2.0.10 ALAS2-2025-2744
Amazon Linux 2 python3 +6 3.7.16-1.amzn2.0.9 ALAS2-2025-2743

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 9 python3 +7 3.9.25-2.0.1.el9_7 ELSA-2025-23342
Oracle Linux 8 python39 +7 3.9.25-2.module+el8.10.0+90733+27f37730 ELSA-2025-23530
Oracle Linux 8 python39-Cython 0.29.21-5.module+el8.9.0+90016+9c2d6573 ELSA-2025-23530
Oracle Linux 8 python39-PyMySQL 0.10.1-2.module+el8.9.0+90016+9c2d6573 ELSA-2025-23530
Oracle Linux 8 python39-attrs 20.3.0-2.module+el8.9.0+90016+9c2d6573 ELSA-2025-23530
Oracle Linux 8 python39-cffi 1.14.3-2.module+el8.9.0+90016+9c2d6573 ELSA-2025-23530
Oracle Linux 8 python39-chardet 3.0.4-19.module+el8.9.0+90016+9c2d6573 ELSA-2025-23530
Oracle Linux 8 python39-cryptography 3.3.1-3.0.1.module+el8.10.0+90269+2fa22b99 ELSA-2025-23530
Oracle Linux 8 python39-idna 2.10-4.module+el8.10.0+90341+71ca88f4 ELSA-2025-23530
Oracle Linux 8 python39-iniconfig 1.1.1-2.module+el8.9.0+90016+9c2d6573 ELSA-2025-23530
Oracle Linux 8 python39-lxml 4.6.5-1.module+el8.9.0+90016+9c2d6573 ELSA-2025-23530
Oracle Linux 8 python39-mod_wsgi 4.7.1-7.module+el8.10.0+90647+49247197.1 ELSA-2025-23530
Oracle Linux 8 python39-more-itertools 8.5.0-2.module+el8.9.0+90016+9c2d6573 ELSA-2025-23530
Oracle Linux 8 python39-numpy +2 1.19.4-3.module+el8.9.0+90016+9c2d6573 ELSA-2025-23530
Oracle Linux 8 python39-packaging 20.4-4.module+el8.9.0+90016+9c2d6573 ELSA-2025-23530
Oracle Linux 8 python39-pip +1 20.2.4-9.module+el8.10.0+90269+2fa22b99 ELSA-2025-23530
Oracle Linux 8 python39-pluggy 0.13.1-3.module+el8.9.0+90016+9c2d6573 ELSA-2025-23530
Oracle Linux 8 python39-ply 3.11-10.module+el8.9.0+90016+9c2d6573 ELSA-2025-23530
Oracle Linux 8 python39-psutil 5.8.0-4.module+el8.9.0+90016+9c2d6573 ELSA-2025-23530
Oracle Linux 8 python39-psycopg2 +2 2.8.6-3.module+el8.10.0+90269+2fa22b99 ELSA-2025-23530
Oracle Linux 8 python39-py 1.10.0-1.module+el8.9.0+90016+9c2d6573 ELSA-2025-23530
Oracle Linux 8 python39-pybind11 +1 2.7.1-1.module+el8.9.0+90016+9c2d6573 ELSA-2025-23530
Oracle Linux 8 python39-pycparser 2.20-3.module+el8.9.0+90016+9c2d6573 ELSA-2025-23530
Oracle Linux 8 python39-pyparsing 2.4.7-5.module+el8.9.0+90016+9c2d6573 ELSA-2025-23530
Oracle Linux 8 python39-pysocks 1.7.1-4.module+el8.9.0+90016+9c2d6573 ELSA-2025-23530
Oracle Linux 8 python39-pytest 6.0.2-2.module+el8.9.0+90016+9c2d6573 ELSA-2025-23530
Oracle Linux 8 python39-pyyaml 5.4.1-1.module+el8.9.0+90016+9c2d6573 ELSA-2025-23530
Oracle Linux 8 python39-requests 2.25.0-3.module+el8.9.0+90016+9c2d6573 ELSA-2025-23530
Oracle Linux 8 python39-scipy 1.5.4-5.module+el8.9.0+90016+9c2d6573 ELSA-2025-23530
Oracle Linux 8 python39-setuptools +1 50.3.2-7.module+el8.10.0+90647+49247197 ELSA-2025-23530
Oracle Linux 8 python39-six 1.15.0-3.module+el8.9.0+90016+9c2d6573 ELSA-2025-23530
Oracle Linux 8 python39-toml 0.10.1-5.module+el8.9.0+90016+9c2d6573 ELSA-2025-23530
Oracle Linux 8 python39-urllib3 1.25.10-5.module+el8.10.0+90269+2fa22b99 ELSA-2025-23530
Oracle Linux 8 python39-wcwidth 0.2.5-3.module+el8.9.0+90016+9c2d6573 ELSA-2025-23530
Oracle Linux 8 python39-wheel +1 1:0.35.1-4.module+el8.9.0+90016+9c2d6573 ELSA-2025-23530

Advisories 19

References