Skip to main content

pymonocypher CVE-2026-141548

LOW
Integer Overflow or Wraparound (CWE-190)
2026-12-02 GitHub_M
3.3
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Supply nb_blocks >= 2**22 via unbounded caller
  2. Exploit
    32-bit size_t multiply by 1024 wraps allocation
  3. Execution
    crypto_argon2 writes past heap buffer
  4. Impact
    calling process crashes (DoS)

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Integer overflow checks
MITRE ATT&CK

1 technique across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Three concrete prerequisites must all hold, which sharply limits real-world exploitation: (1) the pymonocypher extension must be a 32-bit build where size_t is 32 bits - this excludes every 64-bit PyPI wheel and arises only from building the sdist on i386/armhf or installing piwheels linux_armv6l/linux_armv7l wheels; (2) the calling application must pass an attacker-influenced nb_blocks argument to argon2i_32 (for example an Argon2 cost parameter taken from a file header or stored record) rather than a developer-chosen constant; and (3) that application must NOT bound nb_blocks below 2**22 before the call. If any one fails, the issue is unreachable: 64-bit builds cannot wrap, and a bounded or constant nb_blocks cannot reach the overflow. Impact is limited to a process crash (availability). The original CVSS UI:R reflects that the vulnerable application itself must process the attacker value; the lower bound check at line 422 does not cover the multiplication.

Impact

All signals point to low real-world risk. The input CVSS is 3.3 (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L) with availability-only impact and a local vector, the vuln.today Decision label is 'monitor', there is no CISA KEV listing, and no EPSS score is supplied in the input. A public proof-of-concept exists in the GHSA advisory, but the reporter's own runs only produced a SIGSEGV (process crash) - this is a denial-of-service/robustness issue, not code execution; CWE-190 (integer overflow) leading to CWE-787 (out-of-bounds write) is confirmed by the advisory and reproduced with AddressSanitizer. Exploitation is strongly gated: it requires a 32-bit build (every affected PyPI wheel is 64-bit; 32-bit comes only from the sdist on i386/armhf or piwheels armv6l/armv7l) AND a calling application that forwards an attacker-influenced nb_blocks >= 2**22 without bounding it. The reporter states they found no public project that does this. DATA CONFLICT TO VERIFY: the description, the fix commit (f741a018) and release tag v4.0.3.6 confirm a fix in 4.0.3.6, but the GHSA package record in the input still reads 'fixed in: not yet patched' - the fix-version metadata is stale and should be corrected to 4.0.3.6. No EPSS and no KEV data were provided, so widespread-versus-targeted exploitation cannot be assessed from the input, but given DoS-only impact and the 32-bit precondition this is not a priority item.

Exploit ScenarioDerived

A security-relevant application built as a 32-bit binary (e.g. on i386/armhf or a piwheels ARM wheel) reads an Argon2 cost parameter from an attacker-controlled source such as a file header or stored record and passes it as nb_blocks to argon2i_32 without capping it. An attacker supplies a value of at least 2**22, the 32-bit size_t multiplication by 1024 wraps to a tiny allocation, and crypto_argon2 writes past the heap buffer, crashing the process (demonstrated as SIGSEGV by the reporter's local PoC). The CVSS local vector and the narrow 32-bit/unbounded-parameter precondition mean this is a crash primitive, not a demonstrated code-execution path.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
No patch listed yet

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Dec 02, 2026

Heap-based out-of-bounds write in pymonocypher's argon2i_32 wrapper can crash the calling process when the extension is compiled with a 32-bit size_t and the caller passes an attacker-influenced nb_blocks value of 222 or more. Affected releases are 4.0.2.4 through 4.0.3.5; all 64-bit wheels published on PyPI are immune, so exposure is confined to sdist builds on i386/armhf and the piwheels linux_armv6l and linux_armv7l wheels, and only where the application neither controls nor caps nb_blocks below 222. Impact is availability-only (process crash): the vendor advisory ships a local reproducer script that produces a SIGSEGV on 32-bit builds, and the flaw is fixed in 4.0.3.6, which converts the overflow into a MemoryError.

RemediationAI

Upgrade to pymonocypher 4.0.3.6, the release containing the fix (https://github.com/jetperch/pymonocypher/releases/tag/v4.0.3.6); the patch commit f741a01864e97ab4069d9f9f85a286ebb2d280ec adds a check that raises MemoryError when config.nb_blocks exceeds SIZE_MAX // 1024, so the wrapped allocation can no longer occur. Deployments that cannot rebuild immediately have two caller-side options: validate and cap any nb_blocks value that originates from an external source (file header, stored record, API input) to below 2**22 before calling argon2i_32, at the cost of refusing unusually high Argon2 memory-cost settings, or move the workload to a 64-bit build, where the multiplication cannot wrap - 64-bit wheels from PyPI are unaffected. Updating to 4.0.3.6 is the only complete fix and is the recommendation in the vendor advisory https://github.com/jetperch/pymonocypher/security/advisories/GHSA-q7gf-2v9f-xq2p; note that 32-bit wheels and sdists must be rebuilt, since prebuilt 64-bit artifacts were never vulnerable.

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

pymonocypher is a Cython binding around the Monocypher C cryptographic library. In c_monocypher.pyx, argon2i_32() stores the caller-supplied block count into a uint32_t config field and then sizes the Argon2 work area with malloc((<size_t> nb_blocks) * (<size_t> 1024)); the generated C in the 4.0.3.5 sdist performs the same multiplication after __Pyx_PyLong_As_size_t. On platforms where size_t is 32 bits the product is reduced modulo 232, so nb_blocks >= 222 yields a much smaller allocation than requested (nb_blocks = 222 requests malloc(0), 222 + 8 requests 8 KiB), while crypto_argon2() rounds the block count down to a multiple of four and fills 1024-byte blocks in ascending order, writing past the end of the buffer. The root cause is CWE-190 integer overflow feeding CWE-787 out-of-bounds write. Values whose wrapped size is still huge (for example 2**32 - 1) make malloc fail and raise MemoryError instead. The only pre-existing range check requires nb_blocks >= nb_lanes * 8 (a lower bound added under an earlier advisory for nb_blocks < 8) and the NULL check on the allocation, neither of which covers the multiplication; 4.0.2.1 through 4.0.2.3 are not reachable because argon2i_32 failed with an AttributeError, and 3.1.3.6 raised OverflowError because the multiplication was done in Python integers. The fix adds an explicit guard config.nb_blocks > SIZE_MAX // 1024 that raises MemoryError before allocating.

Know when Pymonocypher gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 3.3 LOW
AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L
vuln.today AI 2.9 LOW

AC:H because exploitation requires both a non-default 32-bit build and an unbounded attacker-controlled nb_blocks; impact is crash-only, so C:N/I:N and A:L.

3.1 AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
4.0 AV:L/AC:H/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low

DescriptionCVE.org

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 222. 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 222; 64-bit builds and callers enforcing that bound are not affected. This issue is fixed in version 4.0.3.6.

Threat Intelligence Overview

Prevalence
Low
niche Python Monocypher wrapper; only 32-bit builds are affected
Data Quality
3 sources
Confidence: Low

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity LOW
CISA KEV No
Public POC No
EPSS N/A
Patch available No
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact· derived
Low

Priority Score

16
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +16
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Integer overflow occurs when an arithmetic operation produces a result that exceeds the maximum value a given integer type can store.

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Affected Products (CPE)CVE.org

cpe:2.3:a:jetperch:pymonocypher:*:*:*:*:*:*:*:*

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy