# GHSA-3x5x-fw77-g54c: dmlc/dgl Vulnerable to Remote Code Execution by Pickle Deserialization via rpc.recv_request()

> Attackers can execute arbitrary code remotely by sending malicious pickle data to the DGL RPC server, affecting distributed training clusters.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 5 Mar 2025

## What is GHSA-3x5x-fw77-g54c?

GHSA-3x5x-fw77-g54c is an unsafe deserialization vulnerability in dgl, published on 5 Mar 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

### Impact
Dgl implements rpc server (start_server() in rpc_server.py) for supporting the RPC communications among different remote users over networks. It relies on pickle serialize and deserialize to pack and unpack network messages. The is a known risk in pickle deserialization functionality that can be used for remote code execution.

### Patches
TBD.

### Workarounds
When running DGL distributed training and inference (DistDGL) make sure you do not assign public IPs to any instance in the cluster.

### References
Issue #7874

### Reported by
Pinji Chen ([cpj24@mails.tsinghua.edu.cn](mailto:cpj24@mails.tsinghua.edu.cn)) from NISL lab (https://netsec.ccert.edu.cn/about) at Tsinghua University

## Which versions are affected by GHSA-3x5x-fw77-g54c?

2 open source packages ship an affected version, including dgl.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `dgl` | PyPI | All versions to 2.4.0 | None |
| `dgl` | PyPI | All versions to 2.4.0 | None |

## How do I fix GHSA-3x5x-fw77-g54c?

No fix has been published for GHSA-3x5x-fw77-g54c yet. Limit exposure of the affected software until one is available.

## Is GHSA-3x5x-fw77-g54c being exploited?

There is no known exploitation of GHSA-3x5x-fw77-g54c in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-3x5x-fw77-g54c and fix it if it is affected.

What it is: GHSA-3x5x-fw77-g54c is an unsafe deserialization vulnerability in dgl, published on 5 Mar 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-3x5x-fw77-g54c in the wild and no public exploit code.

Affected packages and fixed versions:
- dgl (PyPI): affected all versions up to 2.4.0; no fix listed
- dgl (PyPI): affected all versions up to 2.4.0; no fix listed

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-3x5x-fw77-g54c/ (Markdown: https://insights.sbomify.com/GHSA-3x5x-fw77-g54c/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-3x5x-fw77-g54c

---
From sbomify Insights: https://insights.sbomify.com/GHSA-3x5x-fw77-g54c/
Summaries are generated and may contain mistakes; the official description above is the record.
