cve.bz

CVE-2023-23931 cryptography.io cryptography

6.5 mediumExploit referenceEPSS 1.3%Fix available

Medium (6.5) in cryptography.io cryptography. EPSS 1.3% estimated probability of exploitation activity in the next 30 days. Fixed in cryptography 39.0.1.

On this page
cryptography is a package designed to expose cryptographic primitives and recipes to Python developers. In affected versions `Cipher.update_into` would accept Python objects which implement the buffer protocol, but provide only immutable buffers. This would allow immutable objects (such as `bytes`) to be mutated, thus violating fundamental rules of Python and resulting in corrupted output. This now correctly raises an exception. This issue has been present since `update_into` was originally introduced in cryptography 1.8.

Severity

CVSS 3.1

6.5 medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
EPSS
1.3% (unchanged from 1.3% a week ago; 1.3% 30 days ago) estimated probability of exploitation activity in the next 30 days; 71st percentile. Scored 2026-11-21. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: partial, assessed 2025-03-10. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-754 Improper Check for Unusual or Exceptional Conditions
OWASP Top 10
A10:2025 Mishandling of Exceptional Conditions
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2023-23931 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2023-23931?via=ask-ai-copy and https://cve.bz/cve/CVE-2023-23931?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2023-23931 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
cryptography.io:cryptographyfrom 1.8 before 39.0.1

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-w7pp-m8wf-vj6rPyPIcryptography>=1.8 <39.0.139.0.1
PYSEC-2023-11PyPIcryptography>=1.8 <39.0.139.0.1

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian10python-cryptography2.6.1-3+deb10u3DLA-3331-1
Debian10python-cryptography2.6.1-3+deb10u4DLA-3331-2
Debian11python-cryptography3.3.2-1+deb11u1DLA-3922-1
Debian12, 13, 14python-cryptography38.0.4-3DEBIAN-CVE-2023-23931
Ubuntu20.04:LTSpython-cryptography2.8-3ubuntu0.2UBUNTU-CVE-2023-23931 USN-6539-1
Ubuntu22.04:LTSpython-cryptography3.4.8-1ubuntu2.1UBUNTU-CVE-2023-23931 USN-6539-1
Ubuntu26.04:LTSpython-cryptography46.0.5-1ubuntu2.2USN-8776-1
UbuntuPro:18.04:LTSpython-cryptography2.1.4-1ubuntu1.4+esm6UBUNTU-CVE-2023-23931 USN-8776-1
Red Hatansible_automation_platform:2.4::el8automation-controller-venv-tower0:4.4.3-1.el8apRHSA-2023:4971
Red Hatansible_automation_platform:2.4::el8automation-eda-controller, automation-eda-controller-ui, automation-eda-controller-server0:1.0.1-1.el8apRHSA-2023:4693
Red Hatansible_automation_platform:2.4::el8python39-django, python3x-django0:3.2.20-1.el8apRHSA-2023:4693
Red Hatansible_automation_platform:2.4::el8python39-gitpython, python3x-gitpython0:3.1.32-1.el8apRHSA-2023:4971
Red Hatansible_automation_platform:2.4::el8python39-requests, python3x-requests0:2.31.0-1.el8apRHSA-2023:4693
Red Hatansible_automation_platform:2.4::el8, ansible_automation_platform_developer:2.4::el8, ansible_automation_platform_inside:2.4::el8python39-cryptography, python3x-cryptography, python39-cryptography-debuginfo and 1 more0:38.0.4-2.el8apRHSA-2023:4693
Red Hatansible_automation_platform:2.4::el9automation-controller-venv-tower0:4.4.3-1.el9apRHSA-2023:4971
Red Hatansible_automation_platform:2.4::el9automation-eda-controller, automation-eda-controller-ui, automation-eda-controller-server0:1.0.1-1.el9apRHSA-2023:4693
Red Hatansible_automation_platform:2.4::el9python-django, python3-django0:3.2.20-1.el9apRHSA-2023:4693
Red Hatansible_automation_platform:2.4::el9python-gitpython, python3-gitpython0:3.1.32-1.el9apRHSA-2023:4971
Red Hatansible_automation_platform:2.4::el9, ansible_automation_platform_developer:2.4::el9, ansible_automation_platform_inside:2.4::el9python-cryptography, python3-cryptography, python3-cryptography-debuginfo and 1 more0:38.0.4-2.el9apRHSA-2023:4693
Red Hatenterprise_linux:8::appstreamPyYAML, python39-pyyaml, PyYAML-debugsource and 1 more0:5.4.1-1.module+el8.9.0+19644+d68f775dRHSA-2024:2985
42 more for Red Hat in the JSON and on Red Hat's page.
SUSEHPE Helion OpenStack 8venv-openstack-horizon-hpe12.0.5~dev6-14.52.1SUSE-SU-2023:2144-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8venv-openstack-aodh5.1.1~dev7-12.44.1SUSE-SU-2023:2144-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8venv-openstack-barbican5.0.2~dev3-12.47.1SUSE-SU-2023:2144-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8venv-openstack-ceilometer9.0.8~dev7-12.42.1SUSE-SU-2023:2144-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8venv-openstack-cinder11.2.3~dev29-14.46.1SUSE-SU-2023:2144-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8venv-openstack-designate5.0.3~dev7-12.43.1SUSE-SU-2023:2144-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8venv-openstack-freezer5.0.0.0~xrc2~dev2-10.40.1SUSE-SU-2023:2144-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8venv-openstack-glance15.0.3~dev3-12.43.1SUSE-SU-2023:2144-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8venv-openstack-heat9.0.8~dev22-12.49.1SUSE-SU-2023:2144-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8venv-openstack-ironic9.1.8~dev8-12.45.1SUSE-SU-2023:2144-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8venv-openstack-keystone12.0.4~dev11-11.49.1SUSE-SU-2023:2144-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8venv-openstack-magnum5.0.2_5.0.2_5.0.2~dev31-11.44.1SUSE-SU-2023:2144-1
38 more for SUSE in the JSON and on SUSE's page.
openSUSELeap 15.4, Leap Micro 5.3python-cryptography3.3.2-150400.16.6.1SUSE-SU-2023:0722-1
openSUSETumbleweedpython-cryptography39.0.1-1.1openSUSE-SU-2024:12681-1
openSUSETumbleweedpython-cryptography44.0.0-1.1openSUSE-SU-2025:14739-1
openSUSETumbleweedpython-oci-sdk2.180.0-1.2openSUSE-SU-2026:12020-1
AlmaLinux8python3-cryptography3.2.1-6.el8ALSA-2023:7096
AlmaLinux8python39, python39-idle, python39-libs and 5 more3.9.18-3.module_el8.10.0+3765+2f9a457dALSA-2024:2985
AlmaLinux8python39-Cython0.29.21-5.module_el8.6.0+2780+a40f65e1ALSA-2024:2985
AlmaLinux8python39-Cython0.29.21-5.module_el8.6.0+3248+c431e88cALSA-2024:2985
AlmaLinux8python39-PyMySQL0.10.1-2.module_el8.6.0+2780+a40f65e1ALSA-2024:2985
AlmaLinux8python39-attrs20.3.0-2.module_el8.6.0+2780+a40f65e1ALSA-2024:2985
AlmaLinux8python39-cffi1.14.3-2.module_el8.6.0+2780+a40f65e1ALSA-2024:2985
AlmaLinux8python39-cffi1.14.3-2.module_el8.6.0+3248+c431e88cALSA-2024:2985
AlmaLinux8python39-chardet3.0.4-19.module_el8.6.0+2780+a40f65e1ALSA-2024:2985
AlmaLinux8python39-cryptography3.3.1-3.module_el8.10.0+3765+2f9a457dALSA-2024:2985
AlmaLinux8python39-idna2.10-3.module_el8.6.0+2780+a40f65e1ALSA-2024:2985
AlmaLinux8python39-iniconfig1.1.1-2.module_el8.6.0+2780+a40f65e1ALSA-2024:2985
31 more for AlmaLinux in the JSON.
Rocky Linux8Cython0:0.29.21-5.module+el8.10.0+1582+bc278001RLSA-2024:2985
Rocky Linux8PyYAML0:5.4.1-1.module+el8.10.0+1582+bc278001RLSA-2024:2985
Rocky Linux8mod_wsgi0:4.7.1-7.module+el8.10.0+1582+bc278001RLSA-2024:2985
Rocky Linux8numpy0:1.19.4-3.module+el8.10.0+1582+bc278001RLSA-2024:2985
Rocky Linux8pybind110:2.7.1-1.module+el8.9.0+1357+a3b80af7RLSA-2024:2985
Rocky Linux8pytest0:6.0.2-2.module+el8.10.0+1582+bc278001RLSA-2024:2985
Rocky Linux8python-PyMySQL0:0.10.1-2.module+el8.10.0+1582+bc278001RLSA-2024:2985
Rocky Linux8python-attrs0:20.3.0-2.module+el8.10.0+1582+bc278001RLSA-2024:2985
Rocky Linux8python-cffi0:1.14.3-2.module+el8.10.0+1582+bc278001RLSA-2024:2985
Rocky Linux8python-chardet0:3.0.4-19.module+el8.10.0+1582+bc278001RLSA-2024:2985
Rocky Linux8python-cryptography0:3.3.1-3.module+el8.10.0+1697+7e517775RLSA-2024:2985
Rocky Linux8python-iniconfig0:1.1.1-2.module+el8.9.0+1332+dd574197RLSA-2024:2985
20 more for Rocky Linux in the JSON.
Alpinev3.17py3-cryptography38.0.3-r1ALPINE-CVE-2023-23931
Alpinev3.18, v3.19, v3.20 and 4 morepy3-cryptography39.0.1-r0ALPINE-CVE-2023-23931
Azure Linux2python-cryptography3.3.2-4AZL-13353
Azure Linux3python-cryptography3.3.2-5AZL-35127

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Moderate.

ProductPackageStateAdvisory
Red Hat Ansible Automation Platform 2.4 for RHEL 8python3x-cryptography-0:38.0.4-2.el8apFixed 2023-08-21RHSA-2023:4693
Red Hat Ansible Automation Platform 2.4 for RHEL 8automation-controller-0:4.4.3-1.el8apFixed 2023-09-05RHSA-2023:4971
Red Hat Ansible Automation Platform 2.4 for RHEL 9python-cryptography-0:38.0.4-2.el9apFixed 2023-08-21RHSA-2023:4693
Red Hat Ansible Automation Platform 2.4 for RHEL 9automation-controller-0:4.4.3-1.el9apFixed 2023-09-05RHSA-2023:4971
Red Hat Enterprise Linux 8python39:3.9-8100020240214182535.7044f6c1Fixed 2024-05-22RHSA-2024:2985
Red Hat Enterprise Linux 8python39-devel:3.9-8100020240214182535.7044f6c1Fixed 2024-05-22RHSA-2024:2985
Red Hat Enterprise Linux 8python-cryptography-0:3.2.1-6.el8Fixed 2023-11-14RHSA-2023:7096
Red Hat Enterprise Linux 9python-cryptography-0:36.0.1-4.el9Fixed 2023-11-07RHSA-2023:6615
Red Hat Quay 3quay/quay-rhel8:v3.10.0-150Fixed 2023-11-30RHSA-2023:7341
Red Hat Software Collections for Red Hat Enterprise Linux 7rh-python38-python-cryptography-0:2.8-6.el7Fixed 2023-11-08RHSA-2023:6793
Red Hat Ansible Automation Platform 2ansible-lintNot affected
Red Hat Ansible Automation Platform 2ansible-navigatorNot affected
Red Hat Discovery 1discovery-server-containerAffected
Red Hat Enterprise Linux 7python-cryptographyOut of support scope
Red Hat Enterprise Linux 8python3.11-cryptographyNot affected
Red Hat Enterprise Linux 8python38:3.8/python-cryptographyWill not fix
Red Hat Enterprise Linux 9python3.11-cryptographyNot affected
Red Hat JBoss Enterprise Application Platform 7python-cryptographyNot affected
Red Hat JBoss Enterprise Application Platform Expansion Packpython-cryptographyNot affected
Red Hat OpenShift Data Science (RHODS)odh-minimal-notebook-containerWill not fix
3 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2023-23931.

ICS advisories (CISA)

AdvisoryTitlePublishedSectorsAffectedFixed
ICSA-24-046-11Siemens SCALANCE XCM-/XRM-3002024-02-13MultipleSCALANCE XCH328 (6GK5328-4TS01-2EC2), SCALANCE XCM324 (6GK5324-8TS01-2AC2), SCALANCE XCM328 (6GK5328-4TS01-2AC2) and 8 morenone listed

From CISA's ICS advisories (CSAF), provided under CISA's notification. Only the facts are shown; each advisory is on CISA's page. Credits.

References

Check your stackJSON