{"id":"CVE-2023-23931","published":"2023-02-07T20:54:03Z","modified":"2025-11-03T21:47:19Z","title":"Cipher.update_into can corrupt memory in pyca cryptography","vendor":"pyca","product":"cryptography","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":4.8,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01315,"percentile":0.7146,"provenance":"source"},"cwes":[{"id":"CWE-754","name":"Improper Check for Unusual or Exceptional Conditions"}],"references":[{"url":"https://github.com/pyca/cryptography/security/advisories/GHSA-w7pp-m8wf-vj6r","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/pyca/cryptography/pull/8230/commits/94a50a9731f35405f0357fa5f3b177d46a726ab3","tags":["x_refsource_MISC"]},{"url":"https://security.netapp.com/advisory/ntap-20230324-0007/","tags":[]},{"url":"https://lists.debian.org/debian-lts-announce/2024/10/msg00012.html","tags":[]}],"priority":{"score":17.7,"factors":[{"name":"EPSS percentile","points":14.29},{"name":"CVSS severity","points":3.36}]},"vendorSlug":"pyca","affectedVersions":[{"vendor":"pyca","product":"cryptography","versions":[">=1.8, < 39.0.1"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2025-03-10T21:01:11.762140Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"cryptography","vulnerableRanges":[">=1.8, <39.0.1"],"patched":["39.0.1"],"from":["GHSA-w7pp-m8wf-vj6r","PYSEC-2023-11"],"provenance":"source"}],"summary":{"text":"The flaw is in the Cipher.update_into method of the pyca cryptography package, a Python library for cryptographic primitives and recipes. Because the method accepted buffer-protocol objects that only offer immutable buffers, such as bytes, it could write into them, corrupting data and violating Python's immutability guarantees; an attacker can exploit this over the network without authentication or user interaction, though exploitation requires the application to pass such immutable objects into update_into.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:57:24Z"},"euvd":{"id":"EUVD-2023-0058","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-unknown-python-cryptography-cve-2018-10903","parents":[{"from":"CVE-2020-36242","to":"CVE-2023-23931","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/cryptography/__about__.py","src/cryptography/hazmat/backends/openssl/ciphers.py","vectors/cryptography_vectors/__about__.py"],"commits":["https://github.com/pyca/cryptography/commit/82b6ce28389f0a317bc55ba2091a74b346db7cae","https://github.com/pyca/cryptography/commit/94a50a9731f35405f0357fa5f3b177d46a726ab3","https://github.com/pyca/cryptography/commit/d6951dca25de45abd52da51b608055371fbcde4e"],"basis":"rarely changed file"}]}]}}