CVE-2024-34249: Pywasm3 Pywasm3 Contains A Heap Buffer Vulnerability

CRITICAL
Advisory Identifier: GHSA-mq9p-qw76-q6h7
CVSS 9.8
CWE-122
Published
Advisory Summary

CVE-2024-34249 is a CRITICAL (CVSS 9.8) pywasm3 contains a heap buffer vulnerability (CWE-122: Heap-based Buffer Overflow) affecting Pywasm3 libraries in the PyPI ecosystem. The issue involves pywasm3 contains a heap buffer overflow which leads to segmentation fault. Remediation is available in the latest vendor maintenance releases.

CVE-2024-34249 at a Glance

CVE Identifier CVE-2024-34249
GHSA Identifier GHSA-mq9p-qw76-q6h7
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-122: Heap-based 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-34249

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-34249, 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-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 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 heap buffer overflow which leads to segmentation fault via the function "DeallocateSlot" in wasm3/source/m3_compile.c.

CVE-2024-34249 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-34249?
CVE-2024-34249 is a security vulnerability in Pywasm3 involving pywasm3 contains a heap buffer overflow which leads to segmentation fault under CWE-122: Heap-based 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-34249?
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-34249?
CVE-2024-34249 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-34249?
CVE-2024-34249 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-2024-34249?
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-mq9p-qw76-q6h7",
  "modified" : "2026-06-09T19:04:04Z",
  "published" : "2024-05-06T15:30:39Z",
  "aliases" : [ "CVE-2024-34249" ],
  "summary" : "pywasm3 contains a heap buffer overflow which leads to segmentation fault",
  "details" : "wasm3 v0.5.0 was discovered to contain a heap buffer overflow which leads to segmentation fault via the function \"DeallocateSlot\" 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-34249"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/wasm3/wasm3/issues/485"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/pywasm3/PYSEC-2024-308.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-122" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-09T19:04:03Z",
    "nvd_published_at" : "2024-05-06T15:15:24Z"
  }
}