CVE-2024-27758 RPyC's missing security check results in code execution when using numpy.array on the server-side.

High 8.4 Published Updated

Remote attackers can execute arbitrary code by exploiting unsafe attribute access in RPyC server methods handling client netrefs.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2024-27758?

CVE-2024-27758 is a high-severity code injection vulnerability in n/a, published on 12 Mar 2024. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

In RPyC before 6.0.0, when a server exposes a method that calls the attribute named __array__ for a client-provided netref (e.g., np.array(client_netref)), a remote attacker can craft a class that results in remote code execution.

Weakness: CWE-306

Which versions are affected by CVE-2024-27758?

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

PackageAffectedFixed in
rpyc PyPIAll versions6.0.0
rpyc PyPIFrom 4.0.06.0.0
rpyc PyPIFrom 4.0.06.0.0
Linux distribution packages (4)
python-rpyc SUSE:Package Hub 15 SP5All versions4.1.5-bp155.3.3.1
python-rpyc-test SUSE:Package Hub 15 SP5All versions4.1.5-bp155.3.3.1
python-rpyc openSUSE:Leap 15.5All versions4.1.5-bp155.3.3.1
python-rpyc-test openSUSE:Leap 15.5All versions4.1.5-bp155.3.3.1

How do I fix CVE-2024-27758?

Upgrade rpyc to 6.0.0 or later.

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

Is CVE-2024-27758 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-27758 exists.

Sources

Also known as DEBIAN-CVE-2024-27758, GHSA-h5cg-53g7-gqjw, PYSEC-2024-44, UBUNTU-CVE-2024-27758, openSUSE-SU-2024:0082-1, openSUSE-SU-2024:13768-1.

Is CVE-2024-27758 in your software?

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

Check your SBOMs for free