CVE-2024-34252: Pywasm3 Pywasm3 Contains A Global Buffer Vulnerability

CRITICAL
Advisory Identifier: GHSA-hh39-vjv8-j337
CVSS 9.8
CWE-120
Published
Advisory Summary

CVE-2024-34252 is a CRITICAL (CVSS 9.8) pywasm3 contains a global buffer vulnerability (CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')) affecting Pywasm3 libraries in the PyPI ecosystem. The issue involves pywasm3 contains a global buffer overflow which leads to segmentation fault. Remediation is available in the latest vendor maintenance releases.

CVE-2024-34252 at a Glance

CVE Identifier CVE-2024-34252
GHSA Identifier GHSA-hh39-vjv8-j337
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')
Affected Product Pywasm3
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 9.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2024-34252

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

pywasm3 fixed: Latest secure release
pip install pywasm3>=Latest secure release
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 pywasm3

How to Check if You Are Affected

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

pip show pywasm3

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow'), where the product copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer. In Pywasm3, 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

wasm3 v0.5.0 was discovered to contain a global buffer overflow which leads to segmentation fault via the function "PreserveRegisterIfOccupied" in wasm3/source/m3_compile.c.

CVE-2024-34252 Affected Pywasm3 Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
pywasm3
PyPI
≤ 0.5.0

References

Frequently Asked Questions

What is CVE-2024-34252?
CVE-2024-34252 is a security vulnerability in Pywasm3 involving pywasm3 contains a global buffer overflow which leads to segmentation fault under CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow').
Which Pywasm3 versions are affected?
Affected versions include releases prior to current release patches across affected packages: pywasm3.
What version fixes CVE-2024-34252?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is pywasm3 affected?
Yes, pywasm3 is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2024-34252?
CVE-2024-34252 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2024-34252?
CVE-2024-34252 is classified under CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') (The product copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer.).
How can I check PyPI dependencies for CVE-2024-34252?
Run the dependency tree command: 'pip show pywasm3'. 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-hh39-vjv8-j337",
  "modified" : "2026-06-09T19:04:21Z",
  "published" : "2024-05-06T15:30:39Z",
  "aliases" : [ "CVE-2024-34252" ],
  "summary" : "pywasm3 contains a global buffer overflow which leads to segmentation fault",
  "details" : "wasm3 v0.5.0 was discovered to contain a global buffer overflow which leads to segmentation fault via the function \"PreserveRegisterIfOccupied\" in wasm3/source/m3_compile.c.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "pywasm3"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.5.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-34252"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/wasm3/wasm3/issues/483"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/pywasm3/PYSEC-2024-309.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/wasm3/pywasm3"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/wasm3/pywasm3/blob/main/wasm3/m3_compile.c#L420"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-120" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-09T19:04:21Z",
    "nvd_published_at" : "2024-05-06T15:15:24Z"
  }
}