CVE-2023-23931

CVE-2023-23931 is a medium-severity vulnerability in Cryptography.io Cryptography with a CVSS 3.x base score of 4.8. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-754.

Key facts

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.

Frequently asked questions

What is CVE-2023-23931?
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.
How severe is CVE-2023-23931?
CVE-2023-23931 has a CVSS 3.x base score of 4.8, rated medium severity. It is exploitable over network with high attack complexity, requires no privileges and no user interaction. Impact on confidentiality is none, integrity low, and availability low.
Is CVE-2023-23931 being actively exploited?
It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 1% (67th percentile), an estimate of the probability of exploitation in the next 30 days.
What products are affected by CVE-2023-23931?
CVE-2023-23931 affects Cryptography.io Cryptography. See the affected-products list for the exact vulnerable versions.
How do I fix CVE-2023-23931?
Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround.
When was CVE-2023-23931 published?
CVE-2023-23931 was published on 2023-02-07 and last updated on 2026-06-17.

References

Affected products (1)

More vulnerabilities in Cryptography.io Cryptography

All CVEs affecting Cryptography.io Cryptography →

Other CWE-754 (Improper Check for Unusual or Exceptional Conditions) vulnerabilities

Browse all CWE-754 (Improper Check for Unusual or Exceptional Conditions) vulnerabilities →