Vulnerabilities in pkg:pypi/pycryptodomex

PACKAGE
Advisory Identifier: GHSA-j225-cvw7-qrx7
Advisory Summary

CVE-2023-52323 is a HIGH (CVSS 5.3) pycryptodome and pycryptodomex side-channel leakage vulnerability (CWE-203: Observable Discrepancy) affecting Pycryptodomex libraries in the PyPI ecosystem. The issue involves pycryptodome and pycryptodomex side-channel leakage for oaep decryption. Remediation is available by upgrading affected packages to version 3.19.1.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/pycryptodomex

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/pycryptodomex. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-j225-cvw7-qrx7 CVE-2023-52323 HIGH PyCryptodome and pycryptodomex side-channel leakage for OAEP decryption

CVE-2023-52323 at a Glance

CVE Identifier CVE-2023-52323
GHSA Identifier GHSA-j225-cvw7-qrx7
Severity HIGH
CVSS v3.1 Base Score 5.3
CWE Classification CWE-203: Observable Discrepancy
Affected Product Pycryptodomex
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2023-52323

To remediate this vulnerability, upgrade all affected Pycryptodomex dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

pycryptodomex fixed: 3.19.1
pip install pycryptodomex>=3.19.1
pycryptodome fixed: 3.19.1
pip install pycryptodome>=3.19.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show pycryptodomex

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2023-52323, inspect your installed packages using pip:

pip show pycryptodomex

Analyze the terminal output to locate any version of Pycryptodomex in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.19.1), your application is affected.

Note: The pip show pycryptodomex command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-203: Observable Discrepancy, where the product behaves differently or sends different responses under different circumstances in a way that is observable to an unauthorized actor. In Pycryptodomex, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

PyCryptodome and pycryptodomex before 3.19.1 allow side-channel leakage for OAEP decryption, exploitable for a Manger attack.

CVE-2023-52323 Affected Pycryptodomex Versions

2 component(s)
Fixed Versions:
3.19.1
Product / Package Ecosystem Affected Versions Fixed Version
pycryptodomex
PyPI
< 3.19.1
3.19.1
pycryptodome
PyPI
< 3.19.1
3.19.1

References

Frequently Asked Questions

What is CVE-2023-52323?
CVE-2023-52323 is a security vulnerability in Pycryptodomex involving PyCryptodome and pycryptodomex side-channel leakage for OAEP decryption under CWE-203: Observable Discrepancy.
Which Pycryptodomex versions are affected?
Affected versions include releases prior to 3.19.1 across affected packages: pycryptodomex, pycryptodome.
What version fixes CVE-2023-52323?
Upgrading to 3.19.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is pycryptodomex affected?
Yes, pycryptodomex is affected in releases prior to 3.19.1. Upgrade your dependency to 3.19.1 or later.
Is pycryptodome affected?
Yes, pycryptodome is affected in releases prior to 3.19.1. Upgrade your dependency to 3.19.1 or later.
What is the CVSS score of CVE-2023-52323?
CVE-2023-52323 has a CVSS v3.1 base score of 5.3 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2023-52323?
CVE-2023-52323 is classified under CWE-203: Observable Discrepancy (The product behaves differently or sends different responses under different circumstances in a way that is observable to an unauthorized actor.).
How can I check PyPI dependencies for CVE-2023-52323?
Run the dependency tree command: 'pip show pycryptodomex'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-j225-cvw7-qrx7",
  "modified" : "2024-10-21T20:52:14Z",
  "published" : "2024-01-05T06:30:19Z",
  "aliases" : [ "CVE-2023-52323" ],
  "summary" : "PyCryptodome and pycryptodomex side-channel leakage for OAEP decryption",
  "details" : "PyCryptodome and pycryptodomex before 3.19.1 allow side-channel leakage for OAEP decryption, exploitable for a Manger attack.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "pycryptodomex"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.19.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "pycryptodome"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.19.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-52323"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Legrandin/pycryptodome/commit/0deea1bfe1489e8c80d2053bbb06a1aa0b181ebd"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Legrandin/pycryptodome"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Legrandin/pycryptodome/blob/master/Changelog.rst"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/pycryptodomex/PYSEC-2024-3.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://pypi.org/project/pycryptodomex/#history"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-203" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-01-05T17:25:46Z",
    "nvd_published_at" : "2024-01-05T04:15:07Z"
  }
}