Description
pymonocypher uses cython to wrap the Monocypher C library. From 4.0.2.4 until 4.0.3.6, argon2i_32 in c_monocypher.pyx multiplies nb_blocks by 1024 in a 32-bit size_t, causing the allocated work-area size to wrap when nb_blocks is at least 2**22. When the smaller allocation succeeds, crypto_argon2 fills 1024-byte blocks up to nb_blocks rounded down to a multiple of four, causing an out-of-bounds heap write that can crash the calling process. If the allocation fails, the call instead raises MemoryError. An affected application must run a 32-bit build and pass an attacker-influenced nb_blocks value without bounding it below 2**22; 64-bit builds and callers enforcing that bound are not affected. This issue is fixed in version 4.0.3.6.
Published: 2026-12-02
Score: 3.3 Low
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Analysis and contextual insights are available on OpenCVE Cloud.

Remediation

No vendor fix or workaround currently provided.

Additional remediation guidance may be available on OpenCVE Cloud.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 02 Dec 2026 19:45:00 +0000

Type Values Removed Values Added
Description pymonocypher uses cython to wrap the Monocypher C library. From 4.0.2.4 until 4.0.3.6, argon2i_32 in c_monocypher.pyx multiplies nb_blocks by 1024 in a 32-bit size_t, causing the allocated work-area size to wrap when nb_blocks is at least 2**22. When the smaller allocation succeeds, crypto_argon2 fills 1024-byte blocks up to nb_blocks rounded down to a multiple of four, causing an out-of-bounds heap write that can crash the calling process. If the allocation fails, the call instead raises MemoryError. An affected application must run a 32-bit build and pass an attacker-influenced nb_blocks value without bounding it below 2**22; 64-bit builds and callers enforcing that bound are not affected. This issue is fixed in version 4.0.3.6.
Title pymonocypher: argon2i_32 can overflow the heap on 32-bit builds when nb_blocks >= 2**22 (work area size wraps)
Weaknesses CWE-190
CWE-787
References
Metrics cvssV3_1

{'score': 3.3, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-12-02T19:31:42.957Z

Reserved: 2026-12-01T21:16:36.622Z

Link: CVE-2026-141548

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

No data.

Weaknesses