CVE-2023-23931
Python vulnerability analysis and mitigation

Overview

The vulnerability (CVE-2023-23931) affects the Python cryptography package, which is designed to expose cryptographic primitives and recipes to Python developers. The issue was discovered in the Cipher.update_into function, which was introduced in cryptography version 1.8. The vulnerability was disclosed on February 7, 2023, affecting all versions from 1.8 until it was patched in version 39.0.1 (GitHub Advisory, NVD).

Technical details

The vulnerability stems from the Cipher.update_into function accepting Python objects that implement the buffer protocol but only provide immutable buffers. This implementation flaw could allow the mutation of immutable objects (such as bytes), which violates fundamental rules of Python and can result in corrupted output. The vulnerability has a CVSS 3.1 base score of 6.5 (Medium), with the vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L (Ubuntu).

Impact

The exploitation of this vulnerability could lead to the corruption of memory when immutable Python objects are passed as the outbuf parameter. This results in corrupted output and potential violation of Python's fundamental rules regarding immutable objects. The impact primarily affects data integrity and could potentially cause application instability (GitHub Advisory).

Mitigation and workarounds

The issue has been fixed in cryptography version 39.0.1 and later versions. The fix implements proper exception handling when immutable objects are passed to the update_into function. Users are advised to upgrade to the patched version. The fix ensures that an exception is raised when attempting to use immutable objects in this context (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-66423HIGH7.1
  • PythonPython
  • tryton-server
NoYesNov 30, 2025
CVE-2025-66454MEDIUM6.5
  • PythonPython
  • arcade-mcp-server
NoYesDec 02, 2025
CVE-2025-66424MEDIUM6.5
  • PythonPython
  • trytond
NoYesNov 30, 2025
CVE-2025-66422MEDIUM4.3
  • PythonPython
  • tryton-server
NoYesNov 30, 2025
CVE-2025-65858LOW3.5
  • PythonPython
  • calibreweb
NoNoDec 02, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management