CVE-2023-23931
python-cryptography: memory corruption via immutable objects
Overview
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
| Ecosystem | Package | Vulnerable | Fixed 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
| Release | Package | Fixed in |
|---|---|---|
| 3.0 | python-cryptography | 0:3.3.2-5.azl3 |
Oracle Linux 2 releases · 35 packages
| Release | Package | Fixed 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
| Release | Package | Fixed 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
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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
| Release | Package | Fixed 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
| Release | Package | Fixed 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
| Release | Package | Fixed in |
|---|---|---|
| 2023 | python-cryptography-debugsource +2 | 36.0.1-1.amzn2023.0.4 |
chainguard 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| mitmproxy | 12.2.1-r0 |
debian 5 releases · 1 package
| Release | Package | Fixed 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
| Release | Package | Fixed in |
|---|---|---|
| python-cryptography | 38.0.4-3 |
openSUSE 1 release · 4 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 5.3 | python3-cryptography | 3.3.2-150400.16.6.1 | SUSE-SU-2023:0722-1 |
rocky 1 release · 21 packages
| Release | Package | Fixed 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
| Release | Package | Fixed in |
|---|---|---|
| 12 | rootio-python-cryptography | 38.0.4-3 |
ubuntu 4 releases · 1 package
| Release | Package | Fixed 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
| Release | Package | Fixed in |
|---|---|---|
| mitmproxy | 12.2.1-r0 |
References
- access.redhat.com https://access.redhat.com/errata/RHSA-2023:6615
- access.redhat.com https://access.redhat.com/errata/RHSA-2024:2985
- access.redhat.com https://access.redhat.com/security/cve/CVE-2023-23931
- bugzilla.redhat.com https://bugzilla.redhat.com/2171817
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=2158559
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=2171817
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=2196183
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=2242493
- creativecommons.org https://creativecommons.org/licenses/by/4.0/
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-40897
Show all 30 references
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-23931
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-27043
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-43804
- errata.almalinux.org https://errata.almalinux.org/9/ALSA-2023-6615.html
- errata.rockylinux.org https://errata.rockylinux.org/RLSA-2024:2985
- github.com https://github.com/pyca/cryptography
- github.com https://github.com/pyca/cryptography/commit/d6951dca25de45abd52da51b608055371fbcde4e
- github.com https://github.com/pyca/cryptography/pull/8230
- github.com https://github.com/pyca/cryptography/pull/8230/commits/94a50a9731f35405f0357fa5f3b177d46a726ab3
- github.com https://github.com/pyca/cryptography/security/advisories/GHSA-w7pp-m8wf-vj6r
- github.com https://github.com/pypa/advisory-database/tree/main/vulns/cryptography/PYSEC-2023-11.yaml
- linux.oracle.com https://linux.oracle.com/cve/CVE-2023-23931.html
- linux.oracle.com https://linux.oracle.com/errata/ELSA-2024-2985.html
- lists.debian.org https://lists.debian.org/debian-lts-announce/2024/10/msg00012.html
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2023-23931
- security.netapp.com https://security.netapp.com/advisory/ntap-20230324-0007
- security.netapp.com https://security.netapp.com/advisory/ntap-20230324-0007/
- ubuntu.com https://ubuntu.com/security/notices/USN-6539-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8776-1
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2023-23931
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.