CVE-2022-35411: Deserialization of Untrusted Data in rpc-py

rpc-py Updated 02 Oct 2025

Summary

09/07/2022
No i
Critical
9.8

CVE-2022-35411: rpc.py vulnerable to Deserialization of Untrusted Data. Affects rpc-py versions >= 0.4.2, <= 0.6.0. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

rpc-py is a Python package that provides a remote procedure call (RPC) framework. It allows communication between different processes or systems by invoking functions remotely. The package supports various data serialization formats, including JSON and Pickle. However, a vulnerability has been discovered in versions up to 0.6.0, where an unauthenticated client can cause the data to be processed with unpickle, leading to potential remote code execution.

Vulnerability Detail

The vulnerability (CVE-2022-35411) in rpc-py arises due to improper handling of untrusted data during deserialization. By sending a specially crafted HTTP header with the value "serializer: pickle", an attacker can trigger the use of the pickle serializer instead of the default JSON serializer. This allows the attacker to execute arbitrary code on the server. It is important to note that rpc-py is not designed for use in open APIs, and in real-world scenarios, external requests cannot reach rpc-py. However, if rpc-py is exposed to untrusted clients, this vulnerability poses a significant risk.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

If updating to the latest version is not feasible, a workaround can be implemented by disabling the use of the pickle serializer. This can be achieved by removing the pickle serializer from the list of available serializers. Here is an example code snippet that demonstrates the workaround:

from rpcpy.serializers import SERIALIZER_NAMES, SERIALIZER_TYPES

# Remove pickle serializer
if 'pickle' in SERIALIZER_NAMES:
    del SERIALIZER_NAMES['pickle']

if 'application/x-pickle' in SERIALIZER_TYPES:
    del SERIALIZER_TYPES['application/x-pickle']

Conclusion

The vulnerability (CVE-2022-35411) in rpc-py allows for the deserialization of untrusted data, potentially leading to remote code execution. It is crucial to update rpc-py to the latest version or apply the provided workaround to mitigate the risk. For further assistance or support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for rpc-py →

Share this vulnerability

FAQ

rpc-py is a Python package that provides a remote procedure call (RPC) framework for inter-process communication.

Versions up to and including 0.6.0 of rpc-py are affected by this vulnerability.

The vulnerability allows an unauthenticated client to execute arbitrary code on the server, potentially leading to remote code execution.

No, rpc-py is not designed for use in open APIs. In real-world scenarios, external requests cannot reach rpc-py.

The vulnerability can be fixed by updating rpc-py to version 0.6.1 or later. Alternatively, you can implement the provided workaround to disable the use of the pickle serializer.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback