CVE-2023-23931 | Cipher.update_into can corrupt memory in pyca cryptography

Exp

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.

Published: 2023-02-07 Last update: 2025-11-03 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2023-23931 is rated Exploit Available (59.2/100): CVSS Medium severity, with medium exploitation likelihood (EPSS 0.69%). Core evidence: 1 public exploit reference(s) are indexed (Exploit-DB). Mandatory action: Public exploits are available—assess exposure, apply mitigations, and prioritize patching.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Public exploit references (Exploit-DB) for CVE-2023-23931

EDB-ID Source Kind Published Link
nvd_ref exploit_tag Exploit-DB ↗

Exploit prediction scoring system (EPSS) score for CVE-2023-23931

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-04-19 0.80% 0.69% -0.12%
2 2026-03-16 0.74% 0.80% +0.06%
3 2026-03-04 0.74%

Full EPSS history (42 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2023-23931

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
4.8 3.1 MEDIUM
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:L)
Attackers could change some data, but it’s limited—not everything goes.
Availability (A:L)
Might cause slowdowns, glitches, or partial disruption—not a full brick.
2.2 2.5 [email protected]
6.5 3.1 MEDIUM
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:L)
Attackers could change some data, but it’s limited—not everything goes.
Availability (A:L)
Might cause slowdowns, glitches, or partial disruption—not a full brick.
3.9 2.5 [email protected]

Weakness enumeration for CVE-2023-23931

GitHub Security Advisory for CVE-2023-23931

GHSA-w7pp-m8wf-vj6r · Severity: medium · Ecosystem: pip — Cipher.update_into can corrupt memory if passed an immutable python object as the outbuf

OS Trackers for CVE-2023-23931

vendor priority summary link
alpine medium CVE-2023-23931: 1 source package rows (py3-cryptography); 8 state rows across 8 repos (3.17-community, 3.18-community, 3.19-community, 3.20-community, 3.21-community, 3.22-community, edge-community, edge-main); fixed 8, open 0. https://security.alpinelinux.org/vuln/CVE-2023-23931
debian not yet assigned CVE-2023-23931 not yet assigned priority: Debian including 1 source packages (python-cryptography), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 5. https://security-tracker.debian.org/tracker/CVE-2023-23931
gentoo normal CVE-2023-23931: 1 GLSA(s) (202407-06), 1 atom(s) (dev-python/cryptography); latest impact normal. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2023-23931
redhat medium https://access.redhat.com/security/cve/CVE-2023-23931
suse medium CVE-2023-23931 severity moderate: SUSE including 315 source package names (1.10.1.16.4.5.392:python3-cryptography-3.3.2-150200.19.1, 2.5.3-61.1:python3-cryptography-3.3.2-150400.16.6.1, …), 714 product×package rows across 342 product lines (Container bci/kiwi, Container ses/7.1/cephcsi/cephcsi, … (342 product lines)): Fixed 531, Known Affected 177, Will Not Fix 6. https://www.suse.com/security/cve/CVE-2023-23931/
ubuntu low CVE-2023-23931 low priority: Ubuntu including 1 source packages (python-cryptography), 13 status rows across 13 suites (bionic, focal, jammy, kinetic, lunar, mantic, noble, oracular, plucky, questing, trusty, upstream, xenial): not-affected 6, released 4, ignored 2, needed 1. https://ubuntu.com/security/CVE-2023-23931

Affected software / configurations for CVE-2023-23931

Vendor Product Version Raw CPE
cryptography.io cryptography >= 1.8, < 39.0.1 cpe:2.3:a:cryptography.io:cryptography:*:*:*:*:*:python:*:*

References for CVE-2023-23931

cvelogic Threat Intelligence