Vulnerabilities in pkg:pypi/fugue

PACKAGE
Advisory Identifier: GHSA-xv5p-fjw5-vrj6
Advisory Summary

CVE-2025-62703 is a HIGH (CVSS 8.8) remote code execution vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Fugue libraries in the PyPI ecosystem. The issue involves fugue is vulnerable to remote code execution by pickle deserialization via flaskrpcserver. Remediation is available in the latest vendor maintenance releases.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/fugue

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-xv5p-fjw5-vrj6 CVE-2025-62703 HIGH Fugue is Vulnerable to Remote Code Execution by Pickle Deserialization via FlaskRPCServer

CVE-2025-62703 at a Glance

CVE Identifier CVE-2025-62703
GHSA Identifier GHSA-xv5p-fjw5-vrj6
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected Product Fugue
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.8

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

Attack Vector Adjacent (AV:A)
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-62703

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

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

How to Check if You Are Affected

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

pip show fugue

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Fugue, 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

### Summary The Fugue framework implements an RPC server system for distributed computing operations. In the core functionality of the RPC server implementation, I found that the _decode() function in fugue/rpc/flask.py directly uses cloudpickle.loads() to deserialize data without any sanitization. This creates a remote code execution vulnerability when malicious pickle data is processed by the RPC server.The vulnerability exists in the RPC communication mechanism where the client can send arbitrary serialized Python objects that will be deserialized on the server side, allowing attackers to execute arbitrary code on the victim's machine. ### Details _decode() function in fugue/rpc/flask.py directly uses cloudpickle.loads() to deserialize data without any sanitization. ### PoC * Step1: The victim user starts an RPC server binding to open network using the Fugue framework. Here, I use the official RPC server code to initialize the server. * Step2: The attacker modifies the _encode() function in fugue/rpc/flask.py to inject malicious pickle data: <img width="740" height="260" alt="image" src="https://github.com/user-attachments/assets/6064516b-e1a6-45fa-a91c-8e276bc4a106" /> In this example, attacker modifies _encode to let the victim execute command “ls -l” * Step 3: The attacker then uses the RPC client to send the malicious request Fugue gives a demo video and the PoC in the attachment, along with modified flask.py. When users reproduce this issue, in the server side (as an victim), users can run python rpc_server.py. In the client side (as an attacker), users can first replace fugue/rpc/flask.py in pip site-packages with provided flask.py in the attachment and then run rpc_client.py. ### Impact Remote code execution in the victim's machine. Once the victim starts the RPCServer with network binding (especially 0.0.0.0), an attacker on the network can gain arbitrary code execution by connecting to the RPCServer and sending crafted pickle payloads. 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. Attachment: https://drive.google.com/file/d/1y8bBBp7dnWoT_WHBtdB0Fts4NRUIfdWi/view?usp=sharing

CVE-2025-62703 Affected Fugue Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
fugue
PyPI
≤ 0.9.2

References

Frequently Asked Questions

What is CVE-2025-62703?
CVE-2025-62703 is a security vulnerability in Fugue involving Fugue is Vulnerable to Remote Code Execution by Pickle Deserialization via FlaskRPCServer under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Which Fugue versions are affected?
Affected versions include releases prior to current release patches across affected packages: fugue.
What version fixes CVE-2025-62703?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is fugue affected?
Yes, fugue 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-62703?
CVE-2025-62703 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2025-62703?
CVE-2025-62703 is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.).
How can I check PyPI dependencies for CVE-2025-62703?
Run the dependency tree command: 'pip show fugue'. 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-xv5p-fjw5-vrj6",
  "modified" : "2025-11-27T09:00:39Z",
  "published" : "2025-11-25T20:39:15Z",
  "aliases" : [ "CVE-2025-62703" ],
  "summary" : "Fugue is Vulnerable to Remote Code Execution by Pickle Deserialization via FlaskRPCServer",
  "details" : "### Summary\nThe Fugue framework implements an RPC server system for distributed computing operations. In the core functionality of the RPC server implementation, I found that the _decode() function in fugue/rpc/flask.py directly uses cloudpickle.loads() to deserialize data without any sanitization. This creates a remote code execution vulnerability when malicious pickle data is processed by the RPC server.The vulnerability exists in the RPC communication mechanism where the client can send arbitrary serialized Python objects that will be deserialized on the server side, allowing attackers to execute arbitrary code on the victim's machine.\n\n### Details\n_decode() function in fugue/rpc/flask.py directly uses cloudpickle.loads() to deserialize data without any sanitization.\n\n### PoC\n* Step1:\nThe victim user starts an RPC server binding to open network using the Fugue framework. Here, I use the official RPC server code to initialize the server. \n\n* Step2:\nThe attacker modifies the _encode() function in fugue/rpc/flask.py to inject malicious pickle data:\n\n<img width=\"740\" height=\"260\" alt=\"image\" src=\"https://github.com/user-attachments/assets/6064516b-e1a6-45fa-a91c-8e276bc4a106\" />\n\nIn this example, attacker modifies _encode to let the victim execute command “ls -l”\n\n* Step 3:\nThe attacker then uses the RPC client to send the malicious request\n\nFugue gives a demo video and the PoC in the attachment, along with modified flask.py. When users reproduce this issue, in the server side (as an victim), users can run python rpc_server.py.  In the client side (as an attacker), users can first replace fugue/rpc/flask.py in pip site-packages with provided flask.py in the attachment and then run rpc_client.py.\n\n\n### Impact\nRemote code execution in the victim's machine. Once the victim starts the RPCServer with network binding (especially 0.0.0.0), an attacker on the network can gain arbitrary code execution by connecting to the RPCServer and sending crafted pickle payloads. 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\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.\n\nAttachment: https://drive.google.com/file/d/1y8bBBp7dnWoT_WHBtdB0Fts4NRUIfdWi/view?usp=sharing",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "fugue"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.9.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/fugue-project/fugue/security/advisories/GHSA-xv5p-fjw5-vrj6"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-62703"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/fugue-project/fugue/commit/6f25326779fd1f528198098d6287c5a863176fc0"
  }, {
    "type" : "WEB",
    "url" : "https://drive.google.com/file/d/1y8bBBp7dnWoT_WHBtdB0Fts4NRUIfdWi/view?usp=sharing"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/fugue-project/fugue"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-502", "CWE-78" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-11-25T20:39:15Z",
    "nvd_published_at" : "2025-11-25T22:15:47Z"
  }
}