CVE-2026-53720
JSON

5.1medium

pymonocypher: Potential heap buffer overflow on nb_blocks in argon2i_32 when provided buffer is too small

Severity
5.1medium CVSS:4.0 by GitHub_M
Exploit likelihood
0.13% (higher than 2% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-8f95-v3jq-cj86PYSEC-2026-3000

Description

pymonocypher uses cython to wrap the Monocypher C library. Prior to version 4.0.2.8, the argon2i_32 implementation does not check the nb_blocks size. If the caller does not provide a sufficiently large buffer based on the API contract, then argon2i_32 will write past the end of the buffer and possibly corrupt the heap. This issue has been patched in version 4.0.2.8.

Affected

Product or packageVersionsReported by
jetperch pymonocypher< 4.0.2.8CVE List
pymonocypher (PyPI)before 4.0.2.8GitHub Advisory Database, PyPA Advisory Database

All scores

GitHub_M5.1medium CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N
GitHubmedium CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N
PyPA Advisory DatabaseNot scored CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N

Classification

CWE-122CWE-787CWE-1284

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

pymonocypher uses cython to wrap the Monocypher C library. Prior to version 4.0.2.8, the argon2i_32 implementation does not check the nb_blocks size. If the caller does not provide a sufficiently large buffer based on the API contract, then argon2i_32 will write past the end of the buffer and possibly corrupt the heap. This issue has been patched in version 4.0.2.8.

GitHub Advisory Database
Impact

The argon2i_32 implementation does not check the nb_blocks size. If the caller does not provide a sufficiently large buffer based on the API contract, then argon2i_32 will write past the end of the buffer and possibly corrupt the heap.

Patches

Fixed in 4.0.2.8, which now verifies that nb_blocks is large enough. See 90ff5b1.

Workarounds

Provide a correctly sized nb_blocks buffer.

pymonocypher thanks Haris (hextheshadow) for the vulnerability report, details, and recommended fix.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-53720 changed 2026-09-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-8f95-v3jq-cj86 changed 2026-07-13CC-BY-4.0
NVDCVE-2026-53720 changed 2026-09-09Public domain
PyPA Advisory DatabasePYSEC-2026-3000 changed 2026-07-13CC-BY-4.0