CVE-2026-141548 — Pymonocypher — CWE-190 · CWE-787
## Summary On builds where `size_t` is 32 bits, `argon2i_32()` computes the size of the Argon2 work area as `nb_blocks * 1024` in `size_t`, and the product wraps for `nb_blocks >= 2**22`. `malloc` is then asked for a much smaller buffer (8 KiB for `nb_blocks = 2**22 + 8`), while `crypto_argon2()` still fills about `nb_blocks` blocks of 1 KiB (it rounds the count down to a multiple of 4). Whenever that small allocation succeeds, the result is a heap buffer overflow (write). The three such cases I ran ended in a segmentation fault, where a caller would expect `MemoryError`. For some values the wrapped size is itself too large (for example `nb_blocks = 2**32 - 1`); then `malloc` fails and the call raises `MemoryError`. The scope is narrow: - Only 32-bit builds are affected. Every wheel on PyPI for the affected releases is 64-bit, and there the product cannot wrap. A 32-bit build comes from the sdist (for example on i386 or armhf) or from piwheels, which publishes `linux_armv6l` and `linux_armv7l` wheels for the affected releases. - `nb_blocks` is normally a constant chosen by the developer, and a request for 4 GiB or more cannot succeed on a 32-bit platform anyway. An application is exposed only if it passes an `nb_blocks` value that it does not control (for example a cost parameter read from a stored record or a file header) without capping it below `2**22`. I did not find a public project that does this. Without such a caller this is a robustness fix, and the severity below
## Summary On builds where `size_t` is 32 bits, `argon2i_32()` computes the size of the Argon2 work area as `nb_blocks * 1024` in `size_t`, and the product wraps for `nb_blocks >= 2**22`. `malloc` is then asked for a much smaller buffer (8 KiB for `nb_blocks = 2**22 + 8`), while `crypto_argon2()` still fills about `nb_blocks` blocks of 1 KiB (it rounds the count down to a multiple of 4). Whenever that small allocation succeeds, the result is a heap buffer overflow (write). The three such cases I ran ended in a segmentation fault, where a caller would expect `MemoryError`. For some values the wrapped size is itself too large (for example `nb_blocks = 2**32 - 1`); then `malloc` fails and the call raises `MemoryError`. The scope is narrow: - Only 32-bit builds are affected. Every wheel on PyPI for the affected releases is 64-bit, and there the product cannot wrap. A 32-bit build comes from the sdist (for example on i386 or armhf) or from piwheels, which publishes `linux_armv6l` and `linux_armv7l` wheels for the affected releases. - `nb_blocks` is normally a constant chosen by the developer, and a request for 4 GiB or more cannot succeed on a 32-bit platform anyway. An application is exposed only if it passes an `nb_blocks` value that it does not control (for example a cost parameter read from a stored record or a file header) without capping it below `2**22`. I did not find a public project that does this. Without such a caller this is a robustness fix, and the severity below
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CVE-2026-141548
CVSS 3.3/10 · LOW · 02.12.2026
CWE: CWE-190, CWE-787
Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 WHAT IS THIS VULNERABILITY?
Buffer Overflow / Memory Corruption
Summary: ## Summary
On builds where size_t is 32 bits, argon2i_32() computes the size of the Argon2 work area as nb_blocks * 1024 in size_t, and the product wraps for nb_blocks >= 222. malloc is then asked for a much smaller buffer (8 KiB for nb_blocks = 222 + 8), while crypto_argon2() still fills about nb_blocks blocks of 1 KiB (it rounds the count down to a multiple of 4). Whene…
Affected: pymonocypher
⚡ ATTACK VECTOR
Local/physical access (AV:L) · no authentication required (PR:N) · user interaction required (UI:R) · low attack complexity (AC:L).
🌍 REAL WORLD IMPACT
Partial confidentiality disclosure (C:L); reduced availability or partial DoS (A:L).
🛡️ REMEDIATION
→ Apply vendor security update for pymonocypher.
→ Verify ASLR/NX/Stack Canary are active.
→ Add WAF rule, create IDS alert for anomalous traffic.
⚠️ URGENCY
📌 Low priority — routine update sufficient.
────────────────────────────────────────
[Automated Technical Vulnerability & CVSS Vector Analysis]