CVE-2026-141548
Received Received - Intake

Integer Overflow in PyMonocypher Argon2i_32

Vulnerability report for CVE-2026-141548, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-12-02

Last updated on: 2026-12-02

Assigner: GitHub, Inc.

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-12-02
Last Modified
2026-12-02
Generated
2026-12-03
AI Q&A
2026-12-02
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 2 associated CPEs
Vendor Product Version / Range
jetperch pymonocypher From 4.0.2.4 (inc) to 4.0.3.6 (exc)
jetperch pymonocypher 4.0.3.6

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-190 The product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. This occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may become a very small or negative number.
CWE-787 The product writes data past the end, or before the beginning, of the intended buffer.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability affects the pymonocypher library's argon2i_32 function on 32-bit systems. When the nb_blocks parameter is set to 2^22 or higher, the calculation nb_blocks * 1024 overflows a 32-bit size_t, causing a smaller-than-expected memory allocation. This leads to a heap buffer overflow when writing data, potentially crashing the application.

Detection Guidance

To detect this vulnerability, check if your system runs a 32-bit build of pymonocypher and if the argon2i_32 function is used with nb_blocks >= 2^22. Inspect the library version; versions before 4.0.3.6 are vulnerable. Use commands like 'pip show pymonocypher' to check the version and 'uname -m' to verify 32-bit architecture.

Impact Analysis

An attacker could exploit this to crash the application by providing a large nb_blocks value, causing a denial-of-service condition. The crash occurs due to a heap buffer overflow when writing to incorrectly allocated memory. Only 32-bit builds are affected; 64-bit systems are not vulnerable.

Mitigation Strategies

Upgrade pymonocypher to version 4.0.3.6 or later. If using a 32-bit system, ensure applications do not pass unchecked nb_blocks values >= 2^22 to argon2i_32. Review and validate input handling for this parameter in your code.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-141548. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...