CVE-2023-23931

Cipher.update_into can corrupt memory in pyca cryptography

Published Feb 7, 2023 CVSS 3.1 · 4.8 Medium EPSS 1.3% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-3331-1 python-cryptography security update
Debian DLA Debian DLA DLA-3331-2 python-cryptography security update
Debian DLA Debian DLA DLA-3922-1 python-cryptography security update
EUVD EUVD EUVD-2023-0058 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.
Github GHSA Github GHSA GHSA-w7pp-m8wf-vj6r Cipher.update_into can corrupt memory if passed an immutable python object as the outbuf
Ubuntu USN Ubuntu USN USN-6539-1 python-cryptography vulnerabilities
Ubuntu USN Ubuntu USN USN-8776-1 python-cryptography vulnerabilities
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Cryptography.io
Cryptography.io cryptography
CPEs cpe:2.3:a:cryptography_project:cryptography:*:*:*:*:*:python:*:* cpe:2.3:a:cryptography.io:cryptography:*:*:*:*:*:python:*:*
Vendors & Products Cryptography Project
Cryptography Project cryptography
Cryptography.io
Cryptography.io cryptography
Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Nov 3, 2025, 9:47 PM
Reserved
Jan 19, 2023, 9:12 PM
Status
Modified
Published
Feb 7, 2023, 9:15 PM
Modified
Jun 17, 2026, 5:38 AM
Severity
Moderate
Public date
Feb 8, 2023, 12:00 AM