pymonocypher: argon2i_32 can overflow the heap on 32-bit builds when nb_blocks >= 2**22 (work area size wraps)
- CVE-2026-141548
- GHSA-q7gf-2v9f-xq2p
- EUVD-2026-141857
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.
Text from the CVE.org record.
Recommendation
pymonocypher
- If you run 4.0.xupdate to 4.0.3.6 or laterPatch update: breaking changes are unlikelypymonocypher 4.0.3.6 on its registry (opens in a new tab)
Taken from the version ranges the sources state. Check the vendor advisory: nothing is said about versions the ranges do not list. Breaking-change risk is read from the version numbers only.
Affected
jetperch pymonocypher
Affected versions Fixed in >= 4.0.2.4, < 4.0.3.6 none stated pymonocypherPyPI
Affected versions Fixed in from 4.0.2.4 to before 4.0.3.6 4.0.3.6
Product versions from the CVE.org record.
Timeline
- Published
Related news
No article from the followed outlets names this vulnerability.