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.
Published: 2026-09-03
Score: 5.1 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Heap Corruption
Action: Patch
AI Analysis

Impact

The vulnerability is in the argon2i_32 routine of the Monocypher C library, accessed via the Cython wrapper in the PyMonocypher package. Because the function does not validate the nb_blocks size supplied by the caller, a buffer that is too small can cause a heap write beyond its allocation, potentially corrupting heap memory. The CVE description does not indicate that this overflow leads to a crash or code execution, only that heap corruption could occur.

Affected Systems

Any installation of Jetperch's pymonocypher before version 4.0.2.8 is affected. The package is used by developers who integrate Monocypher cryptographic primitives, typically in Python environments that rely on the Cython wrapper.

Risk and Exploitability

The CVSS score of 5.1 places this issue in the medium severity range. EPSS data is not available, and the vulnerability is not listed in the CISA KEV catalog. Exploitation would require that the attacker can control the input to argon2i_32, implying a local or insider context, since the overflow occurs only when a caller supplies a buffer that does not respect the API contract.

Generated by OpenCVE AI on September 3, 2026 at 16:50 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade PyMonocypher to version 4.0.2.8 or later, which includes the nb_blocks size check.
  • If an upgrade is not possible, perform strict size validation before invoking argon2i_32, ensuring that the supplied buffer meets the API contract requirements.
  • Implement additional bounds checking around the nb_blocks parameter to guard against out‑of‑bounds writes, following CWE‑122 and CWE‑787 remediation practices.

Generated by OpenCVE AI on September 3, 2026 at 16:50 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-8f95-v3jq-cj86 pymonocypher: Potential heap buffer overflow on nb_blocks in argon2i_32 when provided buffer is too small
History

Fri, 04 Sep 2026 16:00:00 +0000

Type Values Removed Values Added
First Time appeared Jetperch
Jetperch pymonocypher
Vendors & Products Jetperch
Jetperch pymonocypher

Fri, 04 Sep 2026 09:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Thu, 03 Sep 2026 15:45:00 +0000

Type Values Removed Values Added
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.
Title pymonocypher: Potential heap buffer overflow on nb_blocks in argon2i_32 when provided buffer is too small
Weaknesses CWE-122
CWE-1284
CWE-787
References
Metrics cvssV4_0

{'score': 5.1, 'vector': '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'}


Subscriptions

Jetperch Pymonocypher
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-09-03T15:42:53.741Z

Reserved: 2026-06-10T16:43:31.241Z

Link: CVE-2026-53720

cve-icon Vulnrichment

Updated: 2026-09-03T15:42:51.390Z

cve-icon NVD

Status : Deferred

Published: 2026-09-03T16:17:25.360

Modified: 2026-09-09T21:09:13.080

Link: CVE-2026-53720

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-04T15:40:22Z

Weaknesses
  • CWE-122

    Heap-based Buffer Overflow

  • CWE-1284

    Improper Validation of Specified Quantity in Input

  • CWE-787

    Out-of-bounds Write