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 package | Versions | Reported by |
|---|---|---|
| jetperch pymonocypher | < 4.0.2.8 | CVE List |
| pymonocypher (PyPI) | before 4.0.2.8 | GitHub Advisory Database, PyPA Advisory Database |
All scores
| GitHub_M | 5.1medium CVSS:4.0 | CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N |
| GitHub | medium CVSS:4.0 | CVSS: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 Database | Not scored CVSS:4.0 | CVSS: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
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
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-53720 changed 2026-09-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-8f95-v3jq-cj86 changed 2026-07-13 | CC-BY-4.0 |
| NVD | CVE-2026-53720 changed 2026-09-09 | Public domain |
| PyPA Advisory Database | PYSEC-2026-3000 changed 2026-07-13 | CC-BY-4.0 |