CVE-2022-35411
published 2022-07-08CVE-2022-35411: rpc.py through 0.6.0 allows Remote Code Execution because an unpickle occurs when the "serializer: pickle" HTTP header is sent. In other words, although JSON…
PriorityP179critical9.8CVSS 3.1
AVNACLPRNUINSUCHIHAH
EXPLOIT
EPSS
45.86%
98.7th percentile
rpc.py through 0.6.0 allows Remote Code Execution because an unpickle occurs when the "serializer: pickle" HTTP header is sent. In other words, although JSON (not Pickle) is the default data format, an unauthenticated client can cause the data to be processed with unpickle.
Affected
2 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| rpc.py_project | rpc.py | 0.4.2 – 0.6.0 | — |
| rpc.py_project | rpc.py | 0.4.2 – 0.6.0 | — |
Detection & IOCsextracted from sources · hover to see the quote
- →Detect HTTP POST requests containing the header 'serializer: pickle' — this is the trigger for the unauthenticated RCE; no legitimate client should send this header unless explicitly configured. ↗
- →Monitor HTTP POST requests to rpc.py endpoints (e.g. /sayhi) with the 'serializer: pickle' header and a binary (non-JSON) request body, which indicates a pickle payload delivery attempt. ↗
- →Alert on pickle-deserialized payloads using Python's os.system reduce trick — the exploit constructs a PickleRce class whose __reduce__ returns os.system with an attacker-controlled command string. ↗
- →Affected versions are rpc.py v0.4.2 through v0.6.0; flag any deployment of these versions exposed on a network interface. ↗
- ·JSON is the default serializer in rpc.py; the vulnerability is only exploitable when the server accepts and processes the client-supplied 'serializer: pickle' HTTP header without authentication or validation. ↗
CVSS provenance
nvdv3.19.8CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
nvdv2.07.5HIGHAV:N/AC:L/Au:N/C:P/I:P/A:P
CVEs like this are exactly what “Exploited This Week” covers.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
GHSA
rpc.py vulnerable to Deserialization of Untrusted Data
ghsa·2022-07-09
CVE-2022-35411 [CRITICAL] CWE-502 rpc.py vulnerable to Deserialization of Untrusted Data
rpc.py vulnerable to Deserialization of Untrusted Data
rpc.py through 0.6.0 allows Remote Code Execution because an unpickle occurs when the "serializer: pickle" HTTP header is sent. In other words, although JSON (not Pickle) is the default data format, an unauthenticated client can cause the data to be processed with unpickle.
[Per the maintainer](https://github.com/abersheeran/rpc.py/issues/22), rpc.py is not designed for an API that is open to the outside world, and external requests cannot reach rpc.py in real world use.
A [fix](https://github.com/abersheeran/rpc.py/commit/491e7a841ed9a754796d6ab047a9fb16e23bf8bd) exists on the `master` branch. As a workaround, use the following code to turn off pickle in older versions:
```
del SERIALIZER_NAMES[PickleSerializer.name]
del SERIALIZER
OSV
rpc.py vulnerable to Deserialization of Untrusted Data
osv·2022-07-09
CVE-2022-35411 [CRITICAL] rpc.py vulnerable to Deserialization of Untrusted Data
rpc.py vulnerable to Deserialization of Untrusted Data
rpc.py through 0.6.0 allows Remote Code Execution because an unpickle occurs when the "serializer: pickle" HTTP header is sent. In other words, although JSON (not Pickle) is the default data format, an unauthenticated client can cause the data to be processed with unpickle.
[Per the maintainer](https://github.com/abersheeran/rpc.py/issues/22), rpc.py is not designed for an API that is open to the outside world, and external requests cannot reach rpc.py in real world use.
A [fix](https://github.com/abersheeran/rpc.py/commit/491e7a841ed9a754796d6ab047a9fb16e23bf8bd) exists on the `master` branch. As a workaround, use the following code to turn off pickle in older versions:
```
del SERIALIZER_NAMES[PickleSerializer.name]
del SERIALIZER
No detection rules found.
No writeups or analysis indexed.
http://packetstormsecurity.com/files/167872/rpc.py-0.6.0-Remote-Code-Execution.htmlhttps://github.com/abersheeran/rpc.py/commit/491e7a841ed9a754796d6ab047a9fb16e23bf8bdhttps://github.com/ehtec/rpcpy-exploithttps://medium.com/%40elias.hohl/remote-code-execution-0-day-in-rpc-py-709c76690c30http://packetstormsecurity.com/files/167872/rpc.py-0.6.0-Remote-Code-Execution.htmlhttps://github.com/abersheeran/rpc.py/commit/491e7a841ed9a754796d6ab047a9fb16e23bf8bdhttps://github.com/ehtec/rpcpy-exploithttps://medium.com/%40elias.hohl/remote-code-execution-0-day-in-rpc-py-709c76690c30
2022-07-08
Published