Skip to main content
Public proof of conceptFix available

CVE-2023-23931

A public proof of concept exists; no exploitation attested.

  • Published2023-02-07
  • Fixed in39.0.1
  • WeaknessCWE-754

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

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.

Timeline

dates in UTC
  1. 2023-02-0721:15CVE publishedNVD

Versions per branch

NVD · OSV
Cryptography.io cryptography
BranchAffectedFixed in
39.0≥ 1.8, < 39.0.139.0.1

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Products declared by the CNA1 product

As GitHub_M, the CNA that assigned this CVE, declared them in the CVE record; versions as written.

  • pyca cryptography
    Affected
    • = >=1.8, < 39.0.1no fix stated

Source: the CNA record (CVE Program), © The MITRE Corporation,CVE terms of useCVE recordupdated 2023-02-07

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • automation-controller-venv-towerRed Hat:ansible_automation_platform:2.4::el9all versions · fixed in 0:4.4.3-1.el9ap
  • automation-controller-venv-towerRed Hat:ansible_automation_platform:2.4::el8all versions · fixed in 0:4.4.3-1.el8ap
  • automation-eda-controllerRed Hat:ansible_automation_platform:2.4::el9all versions · fixed in 0:1.0.1-1.el9apand 2 other packages
  • automation-eda-controllerRed Hat:ansible_automation_platform:2.4::el8all versions · fixed in 0:1.0.1-1.el8apand 2 other packages
  • cryptographyTuxCare:PyPIfrom 3.4.8.post0 · fixed in 3.4.8.post1+tuxcare
  • cryptographyRoot:PyPIall versions · fixed in 36.0.1+aikido.7
  • cryptographyRoot:PyPIall versions · fixed in 36.0.1+aikido.3
  • cryptographyRoot:PyPIall versions · fixed in 36.0.1+aikido.4

251 more package ranges on OSV.dev

Vendor advisories

  • CVE-2023-23931 Red Hat Product Security302 products fixed · 10 known affected

    python-cryptography: memory corruption via immutable objects

    discovery-server-container as a component of Red Hat Discovery 1 · python-cryptography.src as a component of Red Hat Enterprise Linux 7 · python2-cryptography as a component of Red Hat Enterprise Linux 7 · +7 more

  • RHSA-2024:2985 Red Hat Product Security229 products fixed

    Red Hat Security Advisory: python39:3.9 and python39-devel:3.9 security update

  • ICSA-24-046-11 CISA11 known affected

    Siemens SCALANCE XCM-/XRM-300

    SCALANCE XCH328 (6GK5328-4TS01-2EC2) · SCALANCE XCM324 (6GK5324-8TS01-2AC2) · SCALANCE XCM328 (6GK5328-4TS01-2AC2) · +8 more

  • SSA-806742 Siemens ProductCERT11 known affected

    SSA-806742: Multiple Vulnerabilities in SCALANCE XCM-/XRM-300 before V2.4

    SCALANCE XCH328 (6GK5328-4TS01-2EC2) · SCALANCE XCM324 (6GK5324-8TS01-2AC2) · SCALANCE XCM328 (6GK5328-4TS01-2AC2) · +8 more

  • RHSA-2023:7341 Red Hat Product Security3 products fixed

    Red Hat Security Advisory: Red Hat Quay security update

  • RHSA-2023:7096 Red Hat Product Security13 products fixed

    Red Hat Security Advisory: python-cryptography security update

4 more advisories

Full record on NVD

Fix

  1. Update Cryptography.io cryptography to 39.0.1
  2. Vendor fix Red Hat Product Security RHSA-2024:2985 · 229 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258
  3. Vendor fix Siemens ProductCERT SSA-806742 · 10 productsUpdate to V2.4 or later version
  4. Vendor fix CISA ICSA-24-046-11 · 10 productsUpdate to V2.4 or later version
  5. Vendor fix Red Hat Product Security RHSA-2023:4971 · 8 productsRed Hat Ansible Automation Platform
  6. No fix available, says the vendor Red Hat Product Security CVE-2023-23931 · 1 productAffected
  7. No fix planned, says the vendor Red Hat Product Security CVE-2023-23931 · 5 productsOut of support scope

Advisories and patches

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

  • CISA-ADPSSVC decisionpoc2025-03-10
  • CNACVSS 3.14.8known since 2026-10-23
  • NVDCVSS 3.16.5read 2026-10-23
  • CNAweakness (CWE)CWE-754known since 2026-10-23
  • FIRST EPSSEPSS score1.3 %2026-12-04
  • OSVaffected packages—
  • GitHub AdvisoriesadvisoryModerate2023-02-07

Identifiers

Technical details

CVSS v3 vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
Published
2023-02-07
Last modified
2026-06-17
NVD status
Modified
GitHub advisory
GHSA-w7pp-m8wf-vj6r

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.

Is CVE-2023-23931 actively exploited?

A proof-of-concept exploit exists for CVE-2023-23931, but active exploitation has not been confirmed at this time.

What is the CVSS score for CVE-2023-23931?

CVE-2023-23931 has a CVSS v3 base score of 6.5 (Medium severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L.

Running cryptography? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website checks · 250 API requests/month

Sources for this record