CVE-2026-53720: pymonocypher Potential Heap Buffer Overflow On Vulnerability

MODERATE
Advisory Identifier: GHSA-8f95-v3jq-cj86
CWE-122 CWE-1284 CWE-787
Published
Advisory Summary

CVE-2026-53720 is a MODERATE potential heap buffer overflow on vulnerability (CWE-122: Heap-based Buffer Overflow) affecting pymonocypher libraries in the PyPI ecosystem. The issue involves potential heap buffer overflow on nb_blocks in argon2i_32 when provided buffer is too small. Remediation is available by upgrading affected packages to version 4.0.2.8.

CVE-2026-53720 at a Glance

CVE Identifier CVE-2026-53720
GHSA Identifier GHSA-8f95-v3jq-cj86
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-122: Heap-based Buffer Overflow
Affected Product pymonocypher
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2026-53720

To remediate this vulnerability, upgrade all affected pymonocypher dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

pymonocypher fixed: 4.0.2.8
pip install pymonocypher>=4.0.2.8
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show pymonocypher

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-53720, inspect your installed packages using pip:

pip show pymonocypher

Analyze the terminal output to locate any version of pymonocypher in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.0.2.8), your application is affected.

Note: The pip show pymonocypher command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-122: Heap-based Buffer Overflow, where a heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc(). In pymonocypher, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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](https://github.com/jetperch/pymonocypher/commit/90ff5b13b13b5673c372e188f482d8c172e6ab86). ### Workarounds Provide a correctly sized nb_blocks buffer. pymonocypher thanks Haris (hextheshadow) for the vulnerability report, details, and recommended fix.

CVE-2026-53720 Affected pymonocypher Versions

1 component(s)
Fixed Versions:
4.0.2.8
Product / Package Ecosystem Affected Versions Fixed Version
pymonocypher
PyPI
< 4.0.2.8
4.0.2.8

References

Frequently Asked Questions

What is CVE-2026-53720?
CVE-2026-53720 is a security vulnerability in pymonocypher involving Potential heap buffer overflow on nb_blocks in argon2i_32 when provided buffer is too small under CWE-122: Heap-based Buffer Overflow.
Which pymonocypher versions are affected?
Affected versions include releases prior to 4.0.2.8 across affected packages: pymonocypher.
What version fixes CVE-2026-53720?
Upgrading to 4.0.2.8 (or the latest patched release for your respective branch) resolves the vulnerability.
Is pymonocypher affected?
Yes, pymonocypher is affected in releases prior to 4.0.2.8. Upgrade your dependency to 4.0.2.8 or later.
What CWE is associated with CVE-2026-53720?
CVE-2026-53720 is classified under CWE-122: Heap-based Buffer Overflow (A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc().).
How can I check PyPI dependencies for CVE-2026-53720?
Run the dependency tree command: 'pip show pymonocypher'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-8f95-v3jq-cj86",
  "modified" : "2026-07-09T13:42:46Z",
  "published" : "2026-07-09T13:42:46Z",
  "aliases" : [ "CVE-2026-53720" ],
  "summary" : "pymonocypher: Potential heap buffer overflow on nb_blocks in argon2i_32 when provided buffer is too small",
  "details" : "### Impact\nThe 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.\n\n### Patches\nFixed in 4.0.2.8, which now verifies that nb_blocks is large enough.  See [90ff5b1](https://github.com/jetperch/pymonocypher/commit/90ff5b13b13b5673c372e188f482d8c172e6ab86).\n\n### Workarounds\nProvide a correctly sized nb_blocks buffer.\n\npymonocypher thanks Haris (hextheshadow) for the vulnerability report, details, and recommended fix.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "pymonocypher"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.0.2.8"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/jetperch/pymonocypher/security/advisories/GHSA-8f95-v3jq-cj86"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jetperch/pymonocypher/commit/90ff5b13b13b5673c372e188f482d8c172e6ab86"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/jetperch/pymonocypher"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-122", "CWE-1284", "CWE-787" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-09T13:42:46Z",
    "nvd_published_at" : null
  }
}