Vulnerabilities in pkg:pypi/pyquokka

PACKAGE
Advisory Identifier: GHSA-f74j-gffq-vm9p
Advisory Summary

CVE-2025-62515 is a CRITICAL (CVSS 9.8) remote code execution vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Pyquokka libraries in the PyPI ecosystem. The issue involves pyquokka is vulnerable to remote code execution by pickle deserialization via flightserver. Remediation is available in the latest vendor maintenance releases.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/pyquokka

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/pyquokka. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-f74j-gffq-vm9p CVE-2025-62515 CRITICAL pyquokka is Vulnerable to Remote Code Execution by Pickle Deserialization via FlightServer

CVE-2025-62515 at a Glance

CVE Identifier CVE-2025-62515
GHSA Identifier GHSA-f74j-gffq-vm9p
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-502: Deserialization of Untrusted Data
Affected Product Pyquokka
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-2025-62515

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

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

How to Check if You Are Affected

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

pip show pyquokka

Analyze the terminal output to locate any version of Pyquokka 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 pyquokka command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In Pyquokka, 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

### Description In the FlightServer class of the pyquokka framework, the do_action() method directly uses pickle.loads() to deserialize action bodies received from Flight clients without any sanitization or validation, which results in a remote code execution vulnerability. The vulnerable code is located in pyquokka/flight.py at line 283, where arbitrary data from Flight clients is directly passed to pickle.loads(). Even more concerning, when FlightServer is configured to listen on 0.0.0.0 (as shown in the provided server example at line 339), this allows attackers across the entire network to perform arbitrary remote code execution by sending malicious pickled payloads through the set_configs action. In addition, the functions cache_garbage_collect, do_put, and do_get also contain vulnerability points where pickle.loads is used to deserialize untrusted remote data. Please review and fix these issues accordingly. This report uses the set_configs action as an example. ### Proof of Concept * Step 1: The victim user starts a FlightServer that binds to the network interface, e.g.: ``` server = FlightServer("0.0.0.0", location = "grpc+tcp://0.0.0.0:5005") server.serve() ```` * Step 2: The attacker can then send malicious pickle dump data through the Flight client connection. The provided PoC demonstrates how an attacker can execute "ls -l" command: ```python class RCE: def __reduce__(self): import os return (os.system, ('ls -l',)) import pickle action_body = pickle.dumps(RCE()) action = pyarrow.flight.Action("set_configs", action_body) ``` When the server receives this payload, the FlightServer.do_action() method calls pickle.loads(action.body.to_pybytes()) on line 283, which triggers the execution of the malicious code through Python's pickle deserialization mechanism. The provided flight_client.py demonstrates a complete PoC that connects to the vulnerable server and executes arbitrary commands through the pickle deserialization vulnerability. When the vulnerability is reproduced, python flight.py can be run to init the server and then run flight_client.py. There is an attack demo in the attachment. ### Impact Remote code execution on the victim's machine over the network. Once the victim starts the FlightServer with network binding (especially 0.0.0.0), an attacker on the network can gain arbitrary code execution by connecting to the Flight endpoint and sending crafted pickle payloads through the set_configs action. This vulnerability allows for: - Complete system compromise - Data exfiltration - Lateral movement within the network - Denial of service attacks - Installation of persistent backdoors ### Mitigation 1. **Replace unsafe deserialization**: Replace `pickle.loads()` with safer alternatives such as: - JSON serialization for simple data structures - Protocol Buffers or MessagePack for complex data - If pickle must be used, implement a custom `Unpickler` with a restricted `find_class()` method that only allows whitelisted classes 2. **Network security**: - If the service is intended for internal use only, bind to localhost (`127.0.0.1`) instead of `0.0.0.0` - Implement authentication and authorization mechanisms 3. **Security warnings**: When starting the service on public interfaces, display clear security warnings to inform users about the risks.

CVE-2025-62515 Affected Pyquokka Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
pyquokka
PyPI
≤ 0.3.1

References

Frequently Asked Questions

What is CVE-2025-62515?
CVE-2025-62515 is a security vulnerability in Pyquokka involving pyquokka is Vulnerable to Remote Code Execution by Pickle Deserialization via FlightServer under CWE-502: Deserialization of Untrusted Data.
Which Pyquokka versions are affected?
Affected versions include releases prior to current release patches across affected packages: pyquokka.
What version fixes CVE-2025-62515?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is pyquokka affected?
Yes, pyquokka 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-2025-62515?
CVE-2025-62515 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-2025-62515?
CVE-2025-62515 is classified under CWE-502: Deserialization of Untrusted Data (The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.).
How can I check PyPI dependencies for CVE-2025-62515?
Run the dependency tree command: 'pip show pyquokka'. 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-f74j-gffq-vm9p",
  "modified" : "2025-10-17T21:32:52Z",
  "published" : "2025-10-17T18:08:09Z",
  "aliases" : [ "CVE-2025-62515" ],
  "summary" : "pyquokka is Vulnerable to Remote Code Execution by Pickle Deserialization via FlightServer ",
  "details" : "### Description\n\nIn the FlightServer class of the pyquokka framework, the do_action() method directly uses pickle.loads() to deserialize action bodies received from Flight clients without any sanitization or validation, which results in a remote code execution vulnerability. The vulnerable code is located in pyquokka/flight.py at line 283, where arbitrary data from Flight clients is directly passed to pickle.loads().\n\nEven more concerning, when FlightServer is configured to listen on 0.0.0.0 (as shown in the provided server example at line 339), this allows attackers across the entire network to perform arbitrary remote code execution by sending malicious pickled payloads through the set_configs action.\n\nIn addition, the functions cache_garbage_collect, do_put, and do_get also contain vulnerability points where pickle.loads is used to deserialize untrusted remote data. Please review and fix these issues accordingly. This report uses the set_configs action as an example.\n\n\n### Proof of Concept\n\n* Step 1:\nThe victim user starts a FlightServer that binds to the network interface, e.g.:\n```\nserver = FlightServer(\"0.0.0.0\", location = \"grpc+tcp://0.0.0.0:5005\")\nserver.serve()\n````\n* Step 2:\nThe attacker can then send malicious pickle dump data through the Flight client connection. The provided PoC demonstrates how an attacker can execute \"ls -l\" command:\n\n```python\nclass RCE:\ndef __reduce__(self):\nimport os\nreturn (os.system, ('ls -l',))\n\nimport pickle\naction_body = pickle.dumps(RCE())\naction = pyarrow.flight.Action(\"set_configs\", action_body)\n```\n\nWhen the server receives this payload, the FlightServer.do_action() method calls pickle.loads(action.body.to_pybytes()) on line 283, which triggers the execution of the malicious code through Python's pickle deserialization mechanism. The provided flight_client.py demonstrates a complete PoC that connects to the vulnerable server and executes arbitrary commands through the pickle deserialization vulnerability.\n\nWhen the vulnerability is reproduced, python flight.py can be run to init the server and then run flight_client.py. There is an attack demo in the attachment.\n\n### Impact\n\nRemote code execution on the victim's machine over the network. Once the victim starts the FlightServer with network binding (especially 0.0.0.0), an attacker on the network can gain arbitrary code execution by connecting to the Flight endpoint and sending crafted pickle payloads through the set_configs action. This vulnerability allows for:\n\n- Complete system compromise\n- Data exfiltration\n- Lateral movement within the network\n- Denial of service attacks\n- Installation of persistent backdoors\n\n### Mitigation\n\n1. **Replace unsafe deserialization**: Replace `pickle.loads()` with safer alternatives such as:\n   - JSON serialization for simple data structures\n   - Protocol Buffers or MessagePack for complex data\n   - If pickle must be used, implement a custom `Unpickler` with a restricted `find_class()` method that only allows whitelisted classes\n\n2. **Network security**: \n   - If the service is intended for internal use only, bind to localhost (`127.0.0.1`) instead of `0.0.0.0`\n   - Implement authentication and authorization mechanisms\n\n3. **Security warnings**: When starting the service on public interfaces, display clear security warnings to inform users about the risks.",
  "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" : "pyquokka"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.3.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/marsupialtail/quokka/security/advisories/GHSA-f74j-gffq-vm9p"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-62515"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/marsupialtail/quokka"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/marsupialtail/quokka/blob/master/pyquokka/flight.py#L283"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-502" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-10-17T18:08:09Z",
    "nvd_published_at" : "2025-10-17T21:15:36Z"
  }
}