GHSA-xv5p-fjw5-vrj6

Suggest an improvement
Source
https://github.com/advisories/GHSA-xv5p-fjw5-vrj6
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/11/GHSA-xv5p-fjw5-vrj6/GHSA-xv5p-fjw5-vrj6.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-xv5p-fjw5-vrj6
Aliases
Published
2025-11-25T20:39:15Z
Modified
2025-11-27T09:16:42.085070Z
Severity
  • 8.8 (High) CVSS_V3 - CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
Fugue is Vulnerable to Remote Code Execution by Pickle Deserialization via FlaskRPCServer
Details

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 rpcserver.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 rpcclient.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

Database specific
{
    "github_reviewed": true,
    "github_reviewed_at": "2025-11-25T20:39:15Z",
    "severity": "HIGH",
    "nvd_published_at": "2025-11-25T22:15:47Z",
    "cwe_ids": [
        "CWE-502",
        "CWE-78"
    ]
}
References

Affected packages

PyPI / fugue

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Last affected
0.9.2

Affected versions

0.*

0.0.2
0.4.0
0.4.1
0.4.2
0.4.3
0.4.5
0.4.6
0.4.7
0.4.8
0.4.9
0.5.0.dev0
0.5.0.dev1
0.5.0.dev2
0.5.0
0.5.1.dev0
0.5.1.dev1
0.5.1.dev2
0.5.1.dev3
0.5.1.dev4
0.5.1.dev5
0.5.1.dev6
0.5.1
0.5.2.dev0
0.5.2.dev1
0.5.2.dev2
0.5.2
0.5.3.dev1
0.5.3
0.5.4
0.5.5.dev1
0.5.5
0.5.6.dev1
0.5.6.dev2
0.5.6
0.5.7.dev1
0.6.0.dev1
0.6.0.dev2
0.6.0.dev3
0.6.0
0.6.1.dev1
0.6.1.dev2
0.6.1.dev3
0.6.1
0.6.2
0.6.3
0.6.4.dev1
0.6.4.dev2
0.6.4
0.6.5.dev1
0.6.5.dev2
0.6.5.dev3
0.6.5.dev4
0.6.5.dev5
0.6.5.dev6
0.6.5.dev7
0.6.5.dev8
0.6.5.dev9
0.6.5
0.6.6.dev1
0.6.6.dev2
0.6.6.dev3
0.6.6
0.7.0.dev1
0.7.0.dev2
0.7.0.dev3
0.7.0.dev4
0.7.0.dev5
0.7.0
0.7.1.dev1
0.7.1
0.7.2
0.7.3.dev0
0.7.3.dev1
0.7.3
0.7.4.dev0
0.7.4.dev1
0.8.0.dev1
0.8.0.dev2
0.8.0.dev3
0.8.0.dev4
0.8.0
0.8.1.dev1
0.8.1.dev3
0.8.1.dev4
0.8.1
0.8.2.dev1
0.8.2.dev2
0.8.2.dev3
0.8.2.dev4
0.8.2
0.8.3.dev1
0.8.3
0.8.4.dev1
0.8.4.dev2
0.8.4
0.8.5.dev1
0.8.5
0.8.6.dev1
0.8.6.dev2
0.8.6.dev3
0.8.6
0.8.7.dev1
0.8.7.dev2
0.8.7.dev3
0.8.7.dev4
0.8.7.dev5
0.8.7.dev6
0.8.7.dev7
0.8.7.dev8
0.8.7
0.9.0.dev2
0.9.0.dev3
0.9.0.dev4
0.9.0
0.9.1
0.9.2.dev1
0.9.2.dev2
0.9.2

Database specific

source

"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/11/GHSA-xv5p-fjw5-vrj6/GHSA-xv5p-fjw5-vrj6.json"