Breaking News: Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret
Read the Report
Learn How MCP Is Bypassing a Decade of Cloud Security Best Practices
Read the Report
Are you exposed? Connect a repo in minutes.
Scan your repos free

CVE-2023-23931

python-cryptography: memory corruption via immutable objects

Overview

Published
7 Feb 2023
Modified
17 Jun 2026
Medium CVE
3 Registry packages
88 OS packages
18 Linux distributions
Yes Fix available

Description

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.

Source: OX vulnerability database

Severity

6.5 · MEDIUM

CVSS 3.1 base score, scored by NVD.

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
Low

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L

Weakness: CWE-754

Affected packages · 3

Packages affected by CVE-2023-23931
EcosystemPackageVulnerableFixed in
PyPI cryptography >=1.8, <39.0.1 39.0.1
Seal PyPI cryptography >=2.9.2+sp0, <2.9.2+sp999 2.9.2+sp999
Seal PyPI seal-cryptography >=2.9.2+sp1, <2.9.2+sp999 2.9.2+sp999

Open a package to see all its vulnerabilities.

Operating systems · 171 fixes

Azure Linux 1 release · 1 package

fixed 1
python-cryptography
Azure Linux fixes for CVE-2023-23931
ReleasePackageFixed in
3.0 python-cryptography 0:3.3.2-5.azl3

Oracle Linux 2 releases · 35 packages

fixed 36
python39-pymysql python39-toml python39-pluggy python39-wcwidth python39-cython python39-iniconfig +29
Oracle Linux fixes for CVE-2023-23931
ReleasePackageFixed in
8 python39-pymysql 0.10.1-2.module+el8.9.0+90016+9c2d6573
8 python39-toml 0.10.1-5.module+el8.9.0+90016+9c2d6573
8 python39-pluggy 0.13.1-3.module+el8.9.0+90016+9c2d6573
8 python39-wcwidth 0.2.5-3.module+el8.9.0+90016+9c2d6573
8 python39-cython 0.29.21-5.module+el8.9.0+90016+9c2d6573
8 python39-iniconfig 1.1.1-2.module+el8.9.0+90016+9c2d6573

30 more rows

Photon OS 2 releases · 2 packages

fixed 2
python-cryptography python3-cryptography
Photon OS fixes for CVE-2023-23931
ReleasePackageFixed in
4.0 python-cryptography 3.3.2-5.ph4
5.0 python3-cryptography 41.0.7-1.ph5

Red Hat 6 releases · 43 packages

eol 1 fixed 43 wont fix 1
python-cryptography rh-python38-python-wheel rh-python38-python-pip rh-python38-python-requests rh-python38-python-cryptography rh-python38-python +37
Red Hat fixes for CVE-2023-23931
ReleasePackageFixed inAdvisory
7 python-cryptography +2 eol —
7 rh-python38-python-wheel +1 0:0.33.6-9.el7 RHSA-2023:6793
7 rh-python38-python-pip +1 0:19.3.1-4.el7 RHSA-2023:6793
7 rh-python38-python-requests 0:2.22.0-11.el7 RHSA-2023:6793
7 rh-python38-python-cryptography 0:2.8-6.el7 RHSA-2023:6793
7 rh-python38-python +8 0:3.8.18-2.el7 RHSA-2023:6793

39 more rows

SUSE Linux Enterprise 2 releases · 3 packages

fixed 3
python-cffi python-cryptography python3-cryptography
SUSE Linux Enterprise fixes for CVE-2023-23931
ReleasePackageFixed inAdvisory
12.5 python-cffi +1 1.11.5-5.19.1 SUSE-SU-2023:0837-1
12.5 python-cryptography +1 2.8-7.40.1 SUSE-SU-2023:1767-1
15.4 python3-cryptography 3.3.2-150400.16.6.1 SUSE-SU-2023:0722-1

SUSE Linux Enterprise Micro 4 releases · 1 package

fixed 4
python3-cryptography
SUSE Linux Enterprise Micro fixes for CVE-2023-23931
ReleasePackageFixed inAdvisory
5.1 python3-cryptography 3.3.2-150200.19.1 SUSE-SU-2023:1763-1
5.2 python3-cryptography 3.3.2-150200.19.1 SUSE-SU-2023:1763-1
5.3 python3-cryptography 3.3.2-150400.16.6.1 SUSE-SU-2023:0722-1
5.4 python3-cryptography 3.3.2-150400.16.6.1 SUSE-SU-2023:0722-2

alma 3 releases · 35 packages

fixed 36
python3-cryptography python39-pymysql python39-toml python39-pluggy python39-wcwidth python39-cython +29
alma fixes for CVE-2023-23931
ReleasePackageFixed in
8 python3-cryptography 3.2.1-6.el8
8 (python39:3.9) python39-pymysql 0.10.1-2.module_el8.6.0+2780+a40f65e1
8 (python39:3.9) python39-toml 0.10.1-5.module_el8.6.0+2780+a40f65e1
8 (python39:3.9) python39-pluggy 0.13.1-3.module_el8.6.0+2780+a40f65e1
8 (python39:3.9) python39-wcwidth 0.2.5-3.module_el8.6.0+2780+a40f65e1
8 (python39:3.9) python39-cython 0.29.21-5.module_el8.6.0+2780+a40f65e1

30 more rows

alpine 4 releases · 1 package

fixed 4
py3-cryptography
alpine fixes for CVE-2023-23931
ReleasePackageFixed in
3.22 py3-cryptography 39.0.1-r0
3.23 py3-cryptography 39.0.1-r0
3.24 py3-cryptography 39.0.1-r0
edge py3-cryptography 39.0.1-r0

amazon linux 1 release · 1 package

fixed 1
python-cryptography-debugsource
amazon linux fixes for CVE-2023-23931
ReleasePackageFixed in
2023 python-cryptography-debugsource +2 36.0.1-1.amzn2023.0.4

chainguard 1 release · 1 package

fixed 1
mitmproxy
chainguard fixes for CVE-2023-23931
ReleasePackageFixed in
mitmproxy 12.2.1-r0

debian 5 releases · 1 package

fixed 5
python-cryptography
debian fixes for CVE-2023-23931
ReleasePackageFixed in
10 python-cryptography 2.6.1-3+deb10u4
11 python-cryptography 3.3.2-1+deb11u1
12 python-cryptography 38.0.4-3
13 python-cryptography 38.0.4-3
14 python-cryptography 38.0.4-3

echo 1 release · 1 package

fixed 1
python-cryptography
echo fixes for CVE-2023-23931
ReleasePackageFixed in
python-cryptography 38.0.4-3

openSUSE 1 release · 4 packages

fixed 4
python313-oci-sdk python310-oci-sdk python310-cryptography python311-cryptography
openSUSE fixes for CVE-2023-23931
ReleasePackageFixed inAdvisory
Tumbleweed python313-oci-sdk +1 2.180.0-1.2 openSUSE-SU-2026:12020-1
Tumbleweed python310-oci-sdk +3 2.96.0-1.1 openSUSE-SU-2024:12820-1
Tumbleweed python310-cryptography +2 39.0.1-1.1 openSUSE-SU-2024:12681-1
Tumbleweed python311-cryptography +2 44.0.0-1.1 openSUSE-SU-2025:14739-1

openSUSE Leap Micro 1 release · 1 package

fixed 1
python3-cryptography
openSUSE Leap Micro fixes for CVE-2023-23931
ReleasePackageFixed inAdvisory
5.3 python3-cryptography 3.3.2-150400.16.6.1 SUSE-SU-2023:0722-1

rocky 1 release · 21 packages

fixed 21
python39-pymysql python39-toml python39-cffi python39-six python39-numpy python39-urllib3 +15
rocky fixes for CVE-2023-23931
ReleasePackageFixed in
8 (python39:3.9) python39-pymysql 0.10.1-2.module+el8.10.0+1582+bc278001
8 (python39:3.9) python39-toml 0.10.1-5.module+el8.9.0+1332+dd574197
8 (python39:3.9) python39-cffi 1.14.3-2.module+el8.10.0+1582+bc278001
8 (python39:3.9) python39-six 1.15.0-3.module+el8.10.0+1582+bc278001
8 (python39:3.9) python39-numpy +2 1.19.4-3.module+el8.10.0+1582+bc278001
8 (python39:3.9) python39-urllib3 1.25.10-5.module+el8.10.0+1545+03246da9

15 more rows

root.io debian 1 release · 1 package

fixed 1
rootio-python-cryptography
root.io debian fixes for CVE-2023-23931
ReleasePackageFixed in
12 rootio-python-cryptography 38.0.4-3

ubuntu 4 releases · 1 package

fixed 4
python-cryptography
ubuntu fixes for CVE-2023-23931
ReleasePackageFixed in
18.04-ESM python-cryptography 2.1.4-1ubuntu1.4+esm6
20.04 python-cryptography 2.8-3ubuntu0.2
20.04-ESM python-cryptography 2.8-3ubuntu0.2
22.04 python-cryptography 3.4.8-1ubuntu2.1

wolfi 1 release · 1 package

fixed 1
mitmproxy
wolfi fixes for CVE-2023-23931
ReleasePackageFixed in
mitmproxy 12.2.1-r0

References

Show all 30 references

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.