CVE-2023-23931
Cipher.update_into can corrupt memory in pyca cryptography
- State
- Published
- Severity
- 4.8 Medium
- Published
- Feb 7, 2023
- Updated
- Nov 3, 2025
- Reserved
- Jan 19, 2023
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.
Scores
| CVSS | Score | Vector | Source |
|---|---|---|---|
| 3.1 | 4.8 Medium | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L | GitHub_M |
Weaknesses
- CWE-754 Improper Check for Unusual or Exceptional Conditions
Affected Products
| Product | Versions |
|---|---|
cryptographypyca |
|
References
Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.