{"answers":{"affected":"3 open source packages ship an affected version, including cryptography. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-23931 exists.","fix":"Upgrade cryptography to 39.0.1 or later.","what":"CVE-2023-23931 is a medium-severity memory corruption vulnerability in pyca cryptography, published on 7 Feb 2023. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2023-23931 and fix it if it is affected.\n\nWhat it is: CVE-2023-23931 is a medium-severity memory corruption vulnerability in pyca cryptography, published on 7 Feb 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-23931 exists.\n\nAffected packages and fixed versions:\n- cryptography (PyPI): affected from 1.8; fixed in 39.0.1\n- cryptography (PyPI): affected from 1.8; fixed in 39.0.1\n- cryptography (PyPI): affected from 1.8; fixed in 39.0.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2023-23931/ (Markdown: https://insights.sbomify.com/CVE-2023-23931/index.md)","id":"CVE-2023-23931","markdown":"https://insights.sbomify.com/CVE-2023-23931/index.md","name":"CVE-2023-23931","record":{"aliases":["ALPINE-CVE-2023-23931","ALSA-2023:6615","ALSA-2023:7096","AZL-13353","AZL-35127","DEBIAN-CVE-2023-23931","DLA-3331-1","DLA-3331-2","GHSA-w7pp-m8wf-vj6r","MGASA-2023-0071","MINI-462x-826g-9pr9","OESA-2023-1085","OESA-2023-1088","OESA-2023-1090","OESA-2023-1113","PYSEC-2023-11","RHSA-2023:6615","RHSA-2023:7096","ROOT-APP-PYPI-CVE-2023-23931","SUSE-SU-2023:0722-1","SUSE-SU-2023:0722-2","SUSE-SU-2023:0737-1","SUSE-SU-2023:0837-1","SUSE-SU-2023:0838-1","SUSE-SU-2023:0839-1","SUSE-SU-2023:1763-1","SUSE-SU-2023:1767-1","SUSE-SU-2023:2144-1","SUSE-SU-2023:2218-1","UBUNTU-CVE-2023-23931","openSUSE-SU-2024:12681-1","openSUSE-SU-2024:12820-1","openSUSE-SU-2026:12020-1"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"Python cryptography library","requires_auth":"none","summary":"Attackers can corrupt memory by passing immutable buffers to Cipher.update_into, leading to data modification in applications using the pyca cryptography library.","user_interaction":"not_required","vuln_class":"memory_corruption"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"cryptography","vendor":"cryptography.io"}],"cvss":{"score":4.8,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L","version":"3.1"},"cwes":[{"id":"CWE-754","name":"Improper Check for Unusual or Exceptional Conditions"}],"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.","ecosystems":["AlmaLinux:8","AlmaLinux:9","PyPI","Red Hat:enterprise_linux:8::baseos","Red Hat:enterprise_linux:9::baseos","SUSE:HPE Helion OpenStack 8","SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS","SUSE:Linux Enterprise Micro 5.1","SUSE:Linux Enterprise Micro 5.2","SUSE:Linux Enterprise Micro 5.3","SUSE:Linux Enterprise Micro 5.4","SUSE:Linux Enterprise Module for Basesystem 15 SP4","SUSE:Linux Enterprise Real Time 15 SP3","SUSE:Linux Enterprise Server 12 SP5","SUSE:Linux Enterprise Server 15 SP1-LTSS","SUSE:Linux Enterprise Server for SAP Applications 12 SP5","SUSE:Linux Enterprise Server for SAP Applications 15 SP1","SUSE:OpenStack Cloud 8","SUSE:OpenStack Cloud 9","SUSE:OpenStack Cloud Crowbar 8","SUSE:OpenStack Cloud Crowbar 9","openSUSE:Leap 15.4","openSUSE:Leap Micro 5.3","openSUSE:Tumbleweed"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Cipher.update_into can corrupt memory in pyca cryptography","id":"CVE-2023-23931","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"memory_corruption","year":"2023"},"n_packages":101,"n_references":2,"next":{"headline":"Specially crafted RTPS message may cause an OpenDDS application to crash","id":"CVE-2023-23932"},"packages":[{"ecosystem":"PyPI","fixed":["39.0.1"],"introduced":["1.8"],"last_affected":[],"package":"cryptography","purl":null,"source":"GHSA-w7pp-m8wf-vj6r"},{"ecosystem":"PyPI","fixed":["39.0.1"],"introduced":["1.8"],"last_affected":[],"package":"cryptography","purl":"pkg:pypi/cryptography","source":"GHSA-w7pp-m8wf-vj6r"},{"ecosystem":"PyPI","fixed":["39.0.1"],"introduced":["1.8"],"last_affected":[],"package":"cryptography","purl":"pkg:pypi/cryptography","source":"PYSEC-2023-11"},{"ecosystem":"AlmaLinux:8","fixed":["3.2.1-6.el8"],"introduced":["0"],"last_affected":[],"package":"python3-cryptography","purl":"pkg:rpm/almalinux/python3-cryptography","source":"ALSA-2023:7096"},{"ecosystem":"AlmaLinux:9","fixed":["36.0.1-4.el9"],"introduced":["0"],"last_affected":[],"package":"python3-cryptography","purl":"pkg:rpm/almalinux/python3-cryptography","source":"ALSA-2023:6615"},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","fixed":["0:3.2.1-6.el8"],"introduced":["0"],"last_affected":[],"package":"python-cryptography","purl":"pkg:rpm/redhat/python-cryptography","source":"RHSA-2023:7096"},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","fixed":["0:3.2.1-6.el8"],"introduced":["0"],"last_affected":[],"package":"python-cryptography-debugsource","purl":"pkg:rpm/redhat/python-cryptography-debugsource","source":"RHSA-2023:7096"},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","fixed":["0:3.2.1-6.el8"],"introduced":["0"],"last_affected":[],"package":"python3-cryptography","purl":"pkg:rpm/redhat/python3-cryptography","source":"RHSA-2023:7096"},{"ecosystem":"Red Hat:enterprise_linux:8::baseos","fixed":["0:3.2.1-6.el8"],"introduced":["0"],"last_affected":[],"package":"python3-cryptography-debuginfo","purl":"pkg:rpm/redhat/python3-cryptography-debuginfo","source":"RHSA-2023:7096"},{"ecosystem":"Red Hat:enterprise_linux:9::baseos","fixed":["0:36.0.1-4.el9"],"introduced":["0"],"last_affected":[],"package":"python-cryptography","purl":"pkg:rpm/redhat/python-cryptography","source":"RHSA-2023:6615"},{"ecosystem":"Red Hat:enterprise_linux:9::baseos","fixed":["0:36.0.1-4.el9"],"introduced":["0"],"last_affected":[],"package":"python-cryptography-debugsource","purl":"pkg:rpm/redhat/python-cryptography-debugsource","source":"RHSA-2023:6615"},{"ecosystem":"Red Hat:enterprise_linux:9::baseos","fixed":["0:36.0.1-4.el9"],"introduced":["0"],"last_affected":[],"package":"python3-cryptography","purl":"pkg:rpm/redhat/python3-cryptography","source":"RHSA-2023:6615"},{"ecosystem":"Red Hat:enterprise_linux:9::baseos","fixed":["0:36.0.1-4.el9"],"introduced":["0"],"last_affected":[],"package":"python3-cryptography-debuginfo","purl":"pkg:rpm/redhat/python3-cryptography-debuginfo","source":"RHSA-2023:6615"},{"ecosystem":"SUSE:HPE Helion OpenStack 8","fixed":["1.10.0-4.3.1"],"introduced":["0"],"last_affected":[],"package":"python-cffi","purl":"pkg:rpm/suse/python-cffi\u0026distro=HPE%20Helion%20OpenStack%208","source":"SUSE-SU-2023:0839-1"},{"ecosystem":"SUSE:HPE Helion OpenStack 8","fixed":["2.0.3-3.14.2"],"introduced":["0"],"last_affected":[],"package":"python-cryptography","purl":"pkg:rpm/suse/python-cryptography\u0026distro=HPE%20Helion%20OpenStack%208","source":"SUSE-SU-2023:2144-1"},{"ecosystem":"SUSE:HPE Helion OpenStack 8","fixed":["5.1.1~dev7-12.44.1"],"introduced":["0"],"last_affected":[],"package":"venv-openstack-aodh","purl":"pkg:rpm/suse/venv-openstack-aodh\u0026distro=HPE%20Helion%20OpenStack%208","source":"SUSE-SU-2023:2144-1"},{"ecosystem":"SUSE:HPE Helion OpenStack 8","fixed":["5.0.2~dev3-12.47.1"],"introduced":["0"],"last_affected":[],"package":"venv-openstack-barbican","purl":"pkg:rpm/suse/venv-openstack-barbican\u0026distro=HPE%20Helion%20OpenStack%208","source":"SUSE-SU-2023:2144-1"},{"ecosystem":"SUSE:HPE Helion OpenStack 8","fixed":["9.0.8~dev7-12.42.1"],"introduced":["0"],"last_affected":[],"package":"venv-openstack-ceilometer","purl":"pkg:rpm/suse/venv-openstack-ceilometer\u0026distro=HPE%20Helion%20OpenStack%208","source":"SUSE-SU-2023:2144-1"},{"ecosystem":"SUSE:HPE Helion OpenStack 8","fixed":["11.2.3~dev29-14.46.1"],"introduced":["0"],"last_affected":[],"package":"venv-openstack-cinder","purl":"pkg:rpm/suse/venv-openstack-cinder\u0026distro=HPE%20Helion%20OpenStack%208","source":"SUSE-SU-2023:2144-1"},{"ecosystem":"SUSE:HPE Helion OpenStack 8","fixed":["5.0.3~dev7-12.43.1"],"introduced":["0"],"last_affected":[],"package":"venv-openstack-designate","purl":"pkg:rpm/suse/venv-openstack-designate\u0026distro=HPE%20Helion%20OpenStack%208","source":"SUSE-SU-2023:2144-1"},{"ecosystem":"SUSE:HPE Helion OpenStack 8","fixed":["5.0.0.0~xrc2~dev2-10.40.1"],"introduced":["0"],"last_affected":[],"package":"venv-openstack-freezer","purl":"pkg:rpm/suse/venv-openstack-freezer\u0026distro=HPE%20Helion%20OpenStack%208","source":"SUSE-SU-2023:2144-1"},{"ecosystem":"SUSE:HPE Helion OpenStack 8","fixed":["15.0.3~dev3-12.43.1"],"introduced":["0"],"last_affected":[],"package":"venv-openstack-glance","purl":"pkg:rpm/suse/venv-openstack-glance\u0026distro=HPE%20Helion%20OpenStack%208","source":"SUSE-SU-2023:2144-1"},{"ecosystem":"SUSE:HPE Helion OpenStack 8","fixed":["9.0.8~dev22-12.49.1"],"introduced":["0"],"last_affected":[],"package":"venv-openstack-heat","purl":"pkg:rpm/suse/venv-openstack-heat\u0026distro=HPE%20Helion%20OpenStack%208","source":"SUSE-SU-2023:2144-1"},{"ecosystem":"SUSE:HPE Helion OpenStack 8","fixed":["12.0.5~dev6-14.52.1"],"introduced":["0"],"last_affected":[],"package":"venv-openstack-horizon-hpe","purl":"pkg:rpm/suse/venv-openstack-horizon-hpe\u0026distro=HPE%20Helion%20OpenStack%208","source":"SUSE-SU-2023:2144-1"},{"ecosystem":"SUSE:HPE Helion OpenStack 8","fixed":["9.1.8~dev8-12.45.1"],"introduced":["0"],"last_affected":[],"package":"venv-openstack-ironic","purl":"pkg:rpm/suse/venv-openstack-ironic\u0026distro=HPE%20Helion%20OpenStack%208","source":"SUSE-SU-2023:2144-1"},{"ecosystem":"SUSE:HPE Helion OpenStack 8","fixed":["12.0.4~dev11-11.49.1"],"introduced":["0"],"last_affected":[],"package":"venv-openstack-keystone","purl":"pkg:rpm/suse/venv-openstack-keystone\u0026distro=HPE%20Helion%20OpenStack%208","source":"SUSE-SU-2023:2144-1"},{"ecosystem":"SUSE:HPE Helion OpenStack 8","fixed":["5.0.2_5.0.2_5.0.2~dev31-11.44.1"],"introduced":["0"],"last_affected":[],"package":"venv-openstack-magnum","purl":"pkg:rpm/suse/venv-openstack-magnum\u0026distro=HPE%20Helion%20OpenStack%208","source":"SUSE-SU-2023:2144-1"},{"ecosystem":"SUSE:HPE Helion OpenStack 8","fixed":["5.1.1~dev5-12.49.1"],"introduced":["0"],"last_affected":[],"package":"venv-openstack-manila","purl":"pkg:rpm/suse/venv-openstack-manila\u0026distro=HPE%20Helion%20OpenStack%208","source":"SUSE-SU-2023:2144-1"},{"ecosystem":"SUSE:HPE Helion OpenStack 8","fixed":["2.2.2~dev1-11.49.1"],"introduced":["0"],"last_affected":[],"package":"venv-openstack-monasca","purl":"pkg:rpm/suse/venv-openstack-monasca\u0026distro=HPE%20Helion%20OpenStack%208","source":"SUSE-SU-2023:2144-1"},{"ecosystem":"SUSE:HPE Helion OpenStack 8","fixed":["1.5.1_1.5.1_1.5.1~dev3-8.40.1"],"introduced":["0"],"last_affected":[],"package":"venv-openstack-monasca-ceilometer","purl":"pkg:rpm/suse/venv-openstack-monasca-ceilometer\u0026distro=HPE%20Helion%20OpenStack%208","source":"SUSE-SU-2023:2144-1"},{"ecosystem":"SUSE:HPE Helion OpenStack 8","fixed":["4.0.2~dev3-12.42.1"],"introduced":["0"],"last_affected":[],"package":"venv-openstack-murano","purl":"pkg:rpm/suse/venv-openstack-murano\u0026distro=HPE%20Helion%20OpenStack%208","source":"SUSE-SU-2023:2144-1"},{"ecosystem":"SUSE:HPE Helion OpenStack 8","fixed":["11.0.9~dev69-13.50.1"],"introduced":["0"],"last_affected":[],"package":"venv-openstack-neutron","purl":"pkg:rpm/suse/venv-openstack-neutron\u0026distro=HPE%20Helion%20OpenStack%208","source":"SUSE-SU-2023:2144-1"},{"ecosystem":"SUSE:HPE Helion OpenStack 8","fixed":["16.1.9~dev92-11.48.1"],"introduced":["0"],"last_affected":[],"package":"venv-openstack-nova","purl":"pkg:rpm/suse/venv-openstack-nova\u0026distro=HPE%20Helion%20OpenStack%208","source":"SUSE-SU-2023:2144-1"},{"ecosystem":"SUSE:HPE Helion OpenStack 8","fixed":["1.0.6~dev3-12.45.1"],"introduced":["0"],"last_affected":[],"package":"venv-openstack-octavia","purl":"pkg:rpm/suse/venv-openstack-octavia\u0026distro=HPE%20Helion%20OpenStack%208","source":"SUSE-SU-2023:2144-1"},{"ecosystem":"SUSE:HPE Helion OpenStack 8","fixed":["7.0.5~dev4-11.44.1"],"introduced":["0"],"last_affected":[],"package":"venv-openstack-sahara","purl":"pkg:rpm/suse/venv-openstack-sahara\u0026distro=HPE%20Helion%20OpenStack%208","source":"SUSE-SU-2023:2144-1"},{"ecosystem":"SUSE:HPE Helion OpenStack 8","fixed":["2.15.2_2.15.2_2.15.2~dev32-11.35.1"],"introduced":["0"],"last_affected":[],"package":"venv-openstack-swift","purl":"pkg:rpm/suse/venv-openstack-swift\u0026distro=HPE%20Helion%20OpenStack%208","source":"SUSE-SU-2023:2144-1"},{"ecosystem":"SUSE:HPE Helion OpenStack 8","fixed":["8.0.2~dev2-11.44.1"],"introduced":["0"],"last_affected":[],"package":"venv-openstack-trove","purl":"pkg:rpm/suse/venv-openstack-trove\u0026distro=HPE%20Helion%20OpenStack%208","source":"SUSE-SU-2023:2144-1"},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS","fixed":["2.9.2-150100.7.12.1"],"introduced":["0"],"last_affected":[],"package":"python-cryptography","purl":"pkg:rpm/suse/python-cryptography\u0026distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP1-LTSS","source":"SUSE-SU-2023:0737-1"},{"ecosystem":"SUSE:Linux Enterprise Micro 5.1","fixed":["3.3.2-150200.19.1"],"introduced":["0"],"last_affected":[],"package":"python-cryptography","purl":"pkg:rpm/suse/python-cryptography\u0026distro=SUSE%20Linux%20Enterprise%20Micro%205.1","source":"SUSE-SU-2023:1763-1"},{"ecosystem":"SUSE:Linux Enterprise Micro 5.2","fixed":["3.3.2-150200.19.1"],"introduced":["0"],"last_affected":[],"package":"python-cryptography","purl":"pkg:rpm/suse/python-cryptography\u0026distro=SUSE%20Linux%20Enterprise%20Micro%205.2","source":"SUSE-SU-2023:1763-1"}],"prev":{"headline":"vantage6's Pickle serialization is insecure","id":"CVE-2023-23930"},"products":["cryptography"],"published":"2023-02-07","related":[{"cvss_score":9.1,"headline":"PyCA Cryptography symmetrically encrypting large values can lead to integer overflow","id":"CVE-2020-36242","kev_date_added":null,"published":"2021-02-07"},{"cvss_score":8.2,"headline":"cryptography Subgroup Attack Due to Missing Subgroup Validation for SECT Curves","id":"CVE-2026-26007","kev_date_added":null,"published":"2026-02-10"},{"cvss_score":7.5,"headline":"cryptography NULL pointer dereference with pkcs12.serialize_key_and_certificates when called with a non-matching certificate and private key and an hmac_hash override","id":"CVE-2024-26130","kev_date_added":null,"published":"2024-02-21"},{"cvss_score":7.5,"headline":"cryptography mishandles SSH certificates","id":"CVE-2023-38325","kev_date_added":null,"published":"2023-07-14"},{"cvss_score":6.9,"headline":"cryptography has a buffer overflow if non-contiguous buffers were passed to APIs","id":"CVE-2026-39892","kev_date_added":null,"published":"2026-04-08"},{"cvss_score":5.9,"headline":"cryptography vulnerable to NULL-dereference when loading PKCS7 certificates","id":"CVE-2023-49083","kev_date_added":null,"published":"2023-11-29"},{"cvss_score":5.9,"headline":"RSA decryption vulnerable to Bleichenbacher timing vulnerability","id":"CVE-2020-25659","kev_date_added":null,"published":"2021-01-11"}],"sources":[{"class":"attribution","licence":"MIT","name":"AlmaLinux","prefix":"ALSA"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"CC BY 4.0","name":"Red Hat","prefix":"RHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"SUSE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-11-03","vendors":["pyca"]},"summary":"Attackers can corrupt memory by passing immutable buffers to Cipher.update_into, leading to data modification in applications using the pyca cryptography library.","url":"https://insights.sbomify.com/CVE-2023-23931/"}