CVE-2026-31220 PySyft server-side arbitrary Python execution after code approval

Critical 9.8 Published Updated

Remote attackers can execute arbitrary Python code on PySyft servers by submitting malicious functions that bypass security checks during execution.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2026-31220?

CVE-2026-31220 is a critical code injection vulnerability in n/a, published on 12 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

PySyft (Syft Datasite/Server) versions 0.9.5 and earlier are vulnerable to remote code execution due to insufficient validation and sandboxing of user-submitted code. The system allows low-privileged users to submit Python functions (via @sy.syft_function()) for remote execution on the server. While a code approval mechanism exists, the submitted code undergoes no security checks for dangerous operations (e.g., file access, command execution). Once approved, the code is executed within the server process using exec() and eval() functions without proper isolation. A remote attacker can leverage this to execute arbitrary Python code on the server, leading to complete compromise of the server environment.

Weakness: CWE-94

Which versions are affected by CVE-2026-31220?

3 open source packages ship an affected version, including syft.

PackageAffectedFixed in
syft PyPIAll versions to 0.9.5None
syft PyPIAll versions to 0.9.5None
syft PyPIAll versions to 0.9.5None

How do I fix CVE-2026-31220?

No fix has been published for CVE-2026-31220 yet. Limit exposure of the affected software until one is available.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2026-31220 being exploited?

There is no known exploitation of CVE-2026-31220 in the wild and no public exploit code.

Sources

Also known as GHSA-cfpg-c974-jfhq, PYSEC-2026-546.

Is CVE-2026-31220 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free