Skip to main content

pymonocypher CVE-2026-53720

| EUVDEUVD-2026-70531 MEDIUM
Heap-based Buffer Overflow (CWE-122)
2026-07-09 https://github.com/jetperch/pymonocypher GHSA-8f95-v3jq-cj86 PYSEC-2026-3000
5.1
CVSS 4.0 · Vendor: https://github.com/jetperch/pymonocypher
View

Attack ChainAIDerived

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

  1. Access
    Attacker supplies or manipulates nb_blocks sizing input
  2. Delivery
    Application calls argon2i_32 with undersized buffer
  3. Exploit
    Missing size validation skipped in library
  4. Execution
    Write proceeds past heap allocation boundary
  5. Persist
    Heap metadata or adjacent objects corrupted
  6. Impact
    Denial of service or memory corruption impact achieved

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Heap buffer bounds checking
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

Exploitation requires that argon2i_32 be called with an nb_blocks buffer smaller than the minimum required by the Argon2i algorithm's memory requirements. The practical trigger is either developer-level API misuse - the calling code computes nb_blocks incorrectly - or an attacker-controlled input path that influences the nb_blocks sizing before the library call. The vulnerable code path is confined to applications actively invoking the Argon2i password-hashing workflow; applications that do not call argon2i_32 are unaffected. Authentication requirements are not confirmed from available data because no CVSS vector was published. Exploitation is further limited by the requirement that the buffer size error must be large enough to cause an out-of-bounds write but not so large as to be caught by operating-system-level guards such as guard pages; heap allocator behavior and layout introduce additional uncertainty. The vendor workaround - enforcing a correctly sized buffer at every call site - directly removes the exploitable condition.

Impact

No CVSS vector has been published by NVD or the vendor for this vulnerability, and no EPSS score or CISA KEV listing is available, eliminating the primary quantitative risk signals. The vulnerability class - CWE-122 Heap-Based Buffer Overflow - is historically high-severity, as heap corruption can range from denial-of-service crashes to exploitable memory control depending on heap layout and allocator behavior. Real-world risk is bounded by two factors: first, exploitation requires the calling application to pass an undersized nb_blocks value, either through developer error or attacker-influenced input reaching that parameter; second, pymonocypher is a niche cryptographic Python library with limited production deployment footprint, constraining the exposed attack surface. No public exploit has been identified in the provided data. The absence of a CVSS vector means severity metrics are entirely inferred - defenders should treat this as a high-severity library flaw requiring patch priority proportional to how directly their application exposes nb_blocks sizing to external input.

Exploit ScenarioDerived

An application using pymonocypher calculates or accepts externally influenced input for the nb_blocks argument and passes an undersized buffer to argon2i_32; the missing size check allows the function to write beyond the heap allocation, corrupting adjacent heap metadata. No public exploit code has been identified at time of analysis, but a crafted nb_blocks value that causes a minimal size underestimate could trigger reliable heap corruption in a tight feedback loop, potentially enabling process crashes or - depending on heap layout - controlled writes.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Jul 09, 2026

Heap buffer overflow in pymonocypher's argon2i_32 function allows memory corruption when callers supply an undersized nb_blocks buffer, violating the library's API contract without triggering any bounds check. Applications using pymonocypher prior to version 4.0.2.8 that invoke the Argon2i password-hashing interface are at risk of heap corruption, which can produce crashes or potentially enable controlled memory writes. No public exploit code has been identified at time of analysis, and no active exploitation has been confirmed.

RemediationAI

Upgrade pymonocypher to version 4.0.2.8 or later; this release adds nb_blocks size validation in argon2i_32 and is the primary fix. The patching commit is available at https://github.com/jetperch/pymonocypher/commit/90ff5b13b13b5673c372e188f482d8c172e6ab86 and the full advisory at https://github.com/jetperch/pymonocypher/security/advisories/GHSA-8f95-v3jq-cj86. If immediate upgrade is not feasible, the vendor-recommended workaround is to audit every call site of argon2i_32 and ensure the nb_blocks buffer is correctly sized per the documented API contract before each invocation. Note that this workaround requires code-level review and is error-prone; it does not prevent the vulnerability in third-party or transitive callers and should not be treated as a permanent substitute for patching.

Affected VersionsENISA

pymonocypher < 4.0.2.8

Affected Packages

pypi pymonocypher fix: 4.0.2.8

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

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

Technical ContextAI · show details

pymonocypher is a Python wrapper (pip package) for the Monocypher C cryptographic library, exposing bindings for algorithms including Argon2i - a memory-hard password-hashing and key-derivation function standardized in RFC 9106. The argon2i_32 binding accepts an nb_blocks parameter that governs the size of the working memory buffer allocated by the caller. CWE-122 (Heap-Based Buffer Overflow) identifies the root cause: the function proceeds to write into the caller-supplied buffer without first verifying that nb_blocks meets the minimum size required by the algorithm, allowing writes beyond the heap allocation boundary. The upstream fix, committed at 90ff5b13b13b5673c372e188f482d8c172e6ab86, introduces an explicit size validation gate before any memory operation proceeds. The affected CPE is pkg:pip/pymonocypher.

Know when the next one hits your stack

  • 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 (https://github.com/jetperch/pymonocypher) PRIMARY 5.1 MEDIUM
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N
vuln.today AI 8.1 HIGH

Local vector since exploitation occurs via library API call; high complexity because undersized nb_blocks must be supplied; scope changed due to heap corruption potentially affecting surrounding process memory beyond the function.

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

Primary rating from Vendor (https://github.com/jetperch/pymonocypher).

CVSS VectorVendor: https://github.com/jetperch/pymonocypher

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
Low
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

1
CVSS changed
Sep 03, 2026 - 16:22 NVD
5.1 (MEDIUM)

DescriptionCVE.org

Impact

The argon2i_32 implementation does not check the nb_blocks size. If the caller does not provide a sufficiently large buffer based on the API contract, then argon2i_32 will write past the end of the buffer and possibly corrupt the heap.

Patches

Fixed in 4.0.2.8, which now verifies that nb_blocks is large enough. See 90ff5b1.

Workarounds

Provide a correctly sized nb_blocks buffer.

pymonocypher thanks Haris (hextheshadow) for the vulnerability report, details, and recommended fix.

Threat Intelligence Overview

EPSS Score
0.1%
Top 97% exploitable
Prevalence
Rare
niche Python cryptographic bindings library, limited enterprise footprint
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium

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 MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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
Medium

Priority Score

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

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

A heap overflow occurs when a program writes data beyond the bounds of a buffer allocated in the heap memory region.

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