{"id":"UBUNTU-CVE-2023-23931","details":"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.","modified":"2026-09-17T19:56:37.365948156Z","published":"2023-02-07T21:15:00Z","related":["USN-6539-1","USN-8776-1"],"upstream":["CVE-2023-23931"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2023-23931"},{"type":"REPORT","url":"https://github.com/pyca/cryptography/security/advisories/GHSA-w7pp-m8wf-vj6r"},{"type":"REPORT","url":"https://github.com/pyca/cryptography/pull/8230/commits/94a50a9731f35405f0357fa5f3b177d46a726ab3"},{"type":"ADVISORY","url":"https://ubuntu.com/security/notices/USN-6539-1"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2023-23931"},{"type":"ADVISORY","url":"https://ubuntu.com/security/notices/USN-8776-1"}],"affected":[{"package":{"name":"python-cryptography","ecosystem":"Ubuntu:Pro:18.04:LTS","purl":"pkg:deb/ubuntu/python-cryptography?arch=source&distro=esm-infra%2Fbionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.1.4-1ubuntu1.4+esm6"}]}],"versions":["1.9-1","2.1.3-3","2.1.4-1","2.1.4-1build1","2.1.4-1build2","2.1.4-1ubuntu1","2.1.4-1ubuntu1.1","2.1.4-1ubuntu1.2","2.1.4-1ubuntu1.3","2.1.4-1ubuntu1.4","2.1.4-1ubuntu1.4+esm1","2.1.4-1ubuntu1.4+esm3"],"ecosystem_specific":{"availability":"Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro","binaries":[{"binary_version":"2.1.4-1ubuntu1.4+esm6","binary_name":"python-cryptography"},{"binary_version":"2.1.4-1ubuntu1.4+esm6","binary_name":"python3-cryptography"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-23931.json"}},{"package":{"name":"python-cryptography","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/python-cryptography?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.8-3ubuntu0.2"}]}],"versions":["2.6.1-3.1","2.6.1-4","2.6.1-4ubuntu1","2.8-1ubuntu2","2.8-2","2.8-3","2.8-3ubuntu0.1"],"ecosystem_specific":{"binaries":[{"binary_name":"python-cryptography","binary_version":"2.8-3ubuntu0.2"},{"binary_name":"python3-cryptography","binary_version":"2.8-3ubuntu0.2"}],"availability":"No subscription required"},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-23931.json"}},{"package":{"name":"python-cryptography","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/python-cryptography?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.4.8-1ubuntu2.1"}]}],"versions":["3.3.2-1","3.3.2-1build1","3.4.8-1","3.4.8-1ubuntu1","3.4.8-1ubuntu2"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_name":"python3-cryptography","binary_version":"3.4.8-1ubuntu2.1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2023/UBUNTU-CVE-2023-23931.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L"},{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L"},{"type":"Ubuntu","score":"low"}]}