pymonocypher: Potential heap buffer overflow on nb_blocks in argon2i_32 when provided buffer is too small (CVE-2026-53720)
A heap buffer overflow vulnerability exists in pymonocypher's argon2i_32 implementation due to lack of checking the nb_blocks buffer size. If the provided buffer is too small, the function may write beyond its bounds, potentially corrupting the heap. This issue is fixed in version 4.0.2.8 by verifying the buffer size before use. Users should upgrade to 4.0.2.8 or later or ensure the nb_blocks buffer is correctly sized to mitigate the risk.
AI Analysis
Technical Summary
The pymonocypher library's argon2i_32 function does not validate the size of the nb_blocks buffer provided by the caller. This can lead to a heap buffer overflow if the buffer is smaller than required, causing out-of-bounds writes and possible heap corruption. The vulnerability is identified as CWE-122 (Heap-based Buffer Overflow), CWE-1284, and CWE-787. It is fixed in pymonocypher version 4.0.2.8, which adds a check to ensure nb_blocks is sufficiently large before writing. No known exploits are reported in the wild.
Potential Impact
Heap buffer overflow can lead to memory corruption, which may cause application crashes or undefined behavior. While no direct exploitation details are provided, such vulnerabilities can potentially be leveraged for denial of service or other memory corruption attacks. The severity is rated medium/moderate.
Mitigation Recommendations
Upgrade pymonocypher to version 4.0.2.8 or later, where the vulnerability is fixed by validating the nb_blocks buffer size. Alternatively, ensure that the nb_blocks buffer provided to argon2i_32 is correctly sized according to the API contract to prevent overflow. No other mitigations are specified.
pymonocypher: Potential heap buffer overflow on nb_blocks in argon2i_32 when provided buffer is too small (CVE-2026-53720)
Description
A heap buffer overflow vulnerability exists in pymonocypher's argon2i_32 implementation due to lack of checking the nb_blocks buffer size. If the provided buffer is too small, the function may write beyond its bounds, potentially corrupting the heap. This issue is fixed in version 4.0.2.8 by verifying the buffer size before use. Users should upgrade to 4.0.2.8 or later or ensure the nb_blocks buffer is correctly sized to mitigate the risk.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The pymonocypher library's argon2i_32 function does not validate the size of the nb_blocks buffer provided by the caller. This can lead to a heap buffer overflow if the buffer is smaller than required, causing out-of-bounds writes and possible heap corruption. The vulnerability is identified as CWE-122 (Heap-based Buffer Overflow), CWE-1284, and CWE-787. It is fixed in pymonocypher version 4.0.2.8, which adds a check to ensure nb_blocks is sufficiently large before writing. No known exploits are reported in the wild.
Potential Impact
Heap buffer overflow can lead to memory corruption, which may cause application crashes or undefined behavior. While no direct exploitation details are provided, such vulnerabilities can potentially be leveraged for denial of service or other memory corruption attacks. The severity is rated medium/moderate.
Mitigation Recommendations
Upgrade pymonocypher to version 4.0.2.8 or later, where the vulnerability is fixed by validating the nb_blocks buffer size. Alternatively, ensure that the nb_blocks buffer provided to argon2i_32 is correctly sized according to the API contract to prevent overflow. No other mitigations are specified.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-8f95-v3jq-cj86
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-53720"]
- Ecosystems
- ["PyPI"]
- Database Specific Severity
- MODERATE
- Cvss Version
- 4.0
Threat ID: 6a50bac868715ace435892ae
Added to database: 07/10/2026, 09:26:32 UTC
Last enriched: 07/10/2026, 10:25:03 UTC
Last updated: 07/31/2026, 12:27:30 UTC
Views: 64
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.