{"id":"CVE-2025-62703","aliases":["CVE-2025-62703","GHSA-xv5p-fjw5-vrj6","PYSEC-2026-1399"],"related":[],"kind":"vulnerability","state":"published","title":"Fugue is Vulnerable to Remote Code Execution by Pickle Deserialization via FlaskRPCServer","summary":"Fugue is a unified interface for distributed computing that lets users execute Python, Pandas, and SQL code on Spark, Dask, and Ray with minimal rewrites. In version 0.9.2 and prior, there is a remote code execution vulnerability by pickle deserialization via FlaskRPCServer. 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. This issue has been patched via commit 6f25326.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Fugue is a unified interface for distributed computing that lets users execute Python, Pandas, and SQL code on Spark, Dask, and Ray with minimal rewrites. In version 0.9.2 and prior, there is a remote code execution vulnerability by pickle deserialization via FlaskRPCServer. 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. This issue has been patched via commit 6f25326.","source":"cvelist"},{"lang":"en","text":"### 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","format":"markdown","source":"ghsa"},{"lang":"es","text":"Fugue es una interfaz unificada para computación distribuida que permite a los usuarios ejecutar código Python, Pandas y SQL en Spark, Dask y Ray con mínimas reescrituras. En la versión 0.9.2 y anteriores, existe una vulnerabilidad de ejecución remota de código por deserialización de pickle a través de FlaskRPCServer. El framework de Fugue implementa un sistema de servidor RPC para operaciones de computación distribuida. En la funcionalidad central de la implementación del servidor RPC, encontré que la función _decode() en fugue/rpc/flask.py usa directamente cloudpickle.loads() para deserializar datos sin ninguna sanitización. Esto crea una vulnerabilidad de ejecución remota de código cuando datos pickle maliciosos son procesados por el servidor RPC. La vulnerabilidad existe en el mecanismo de comunicación RPC donde el cliente puede enviar objetos Python serializados arbitrarios que serán deserializados en el lado del servidor, permitiendo a los atacantes ejecutar código arbitrario en la máquina de la víctima. Este problema ha sido parcheado mediante el commit 6f25326.","source":"nvd"}],"published":"2025-11-25T20:39:15.000Z","modified":"2026-10-19T13:10:00.110Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"}],"cwes":["CWE-78","CWE-502"],"affected":[{"ranges":[{"version":"<= 0.9.2","status":"affected"}],"vendor":"fugue-project","product":"fugue","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","lastAffected":"0.9.2"}],"ecosystem":"PyPI","package":"fugue","purl":"pkg:pypi/fugue","source":"ghsa"},{"ranges":[{"status":"affected","lastAffected":"0.9.1"}],"vendor":"fugue-project","product":"fugue","cpe":"cpe:2.3:a:fugue-project:fugue:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","lastAffected":"0.9.2"}],"ecosystem":"PyPI","package":"fugue","purl":"pkg:pypi/fugue","source":"pysec"}],"references":[{"url":"https://github.com/fugue-project/fugue/security/advisories/GHSA-xv5p-fjw5-vrj6","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/fugue-project/fugue/commit/6f25326779fd1f528198098d6287c5a863176fc0","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-62703","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://drive.google.com/file/d/1y8bBBp7dnWoT_WHBtdB0Fts4NRUIfdWi/view?usp=sharing","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://github.com/fugue-project/fugue","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/fugue","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-xv5p-fjw5-vrj6","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2025-11-26T15:59:28.938Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-62703","url":"https://www.cve.org/CVERecord?id=CVE-2025-62703","licence":"CVE Terms of Use","modified":"2025-11-26T15:59:41.232Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-xv5p-fjw5-vrj6","url":"https://github.com/advisories/GHSA-xv5p-fjw5-vrj6","licence":"CC-BY-4.0","modified":"2026-07-07T17:56:05.872Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-62703","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-62703","licence":"Public domain","modified":"2026-10-19T13:10:00.110Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-1399","url":"https://osv.dev/vulnerability/PYSEC-2026-1399","licence":"CC-BY-4.0","modified":"2026-07-07T17:46:42.042Z"}],"updatedAt":"2026-11-25T22:59:08.016Z","epss":{"score":0.00784,"percentile":0.57242,"date":"2026-12-01T12:00:22.000Z"}}