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

- Severity: Medium 4.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.31%, higher than 71% of CVEs (2026-12-02)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2023-02-07T20:54:03.628Z
- Modified: 2026-09-10T03:49:52.124Z
- Also known as: GHSA-w7pp-m8wf-vj6r, PYSEC-2023-11
- Weaknesses: CWE-754
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- pyca cryptography: >=1.8, < 39.0.1
- cryptography (PyPI): from 1.8 before 39.0.1; before 94a50a9731f35405f0357fa5f3b177d46a726ab3
- cryptography.io cryptography: from 1.8 before 39.0.1

## Every score

- GitHub_M: CVSS: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: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L`
- GitHub: CVSS:4.0 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L`

## References

- <https://github.com/pyca/cryptography/security/advisories/GHSA-w7pp-m8wf-vj6r> (exploit, advisory, evidence, vendor-advisory, web)
- <https://github.com/pyca/cryptography/pull/8230/commits/94a50a9731f35405f0357fa5f3b177d46a726ab3> (fix, patch)
- <https://security.netapp.com/advisory/ntap-20230324-0007/>
- <https://lists.debian.org/debian-lts-announce/2024/10/msg00012.html> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-23931> (advisory)
- <https://github.com/pyca/cryptography/pull/8230> (web)
- <https://github.com/pyca/cryptography/commit/d6951dca25de45abd52da51b608055371fbcde4e> (web)
- <https://github.com/pyca/cryptography> (package)
- <https://github.com/pypa/advisory-database/tree/main/vulns/cryptography/PYSEC-2023-11.yaml> (web)
- <https://security.netapp.com/advisory/ntap-20230324-0007> (web)

## Sources

- CVE List: [CVE-2023-23931](https://www.cve.org/CVERecord?id=CVE-2023-23931), CVE Terms of Use, modified 2025-11-03
- GitHub Advisory Database: [GHSA-w7pp-m8wf-vj6r](https://github.com/advisories/GHSA-w7pp-m8wf-vj6r), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2023-23931](https://nvd.nist.gov/vuln/detail/CVE-2023-23931), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2023-11](https://osv.dev/vulnerability/PYSEC-2023-11), CC-BY-4.0, modified 2026-02-22

---

Page: https://cve.day/CVE-2023-23931 · Whole record: https://cve.day/CVE-2023-23931.json · Rebuilt by cve.day 2026-11-25T22:58:21.864Z
