CVE-2022-42919 Deserialization in n/a
Local attackers can escalate privileges via unsafe pickle deserialization in Python's multiprocessing forkserver on Linux when using non-default abstract sockets.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2022-42919?
CVE-2022-42919 is a high-severity unsafe deserialization vulnerability in Fedoraproject Fedora, published on 6 Nov 2022. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
Python 3.9.x before 3.9.16 and 3.10.x before 3.10.9 on Linux allows local privilege escalation in a non-default configuration. The Python multiprocessing library, when used with the forkserver start method on Linux, allows pickles to be deserialized from any user in the same machine local network namespace, which in many system configurations means any user on the same machine. Pickles can execute arbitrary code. Thus, this allows for local user privilege escalation to the user that any forkserver process is running as. Setting multiprocessing.util.abstract_sockets_supported to False is a workaround. The forkserver start method for multiprocessing is not the default start method. This issue is Linux specific because only Linux supports abstract namespace sockets. CPython before 3.9 does not make use of Linux abstract namespace sockets by default. Support for users manually specifying an abstract namespace socket was added as a bugfix in 3.7.8 and 3.8.3, but users would need to make specific uncommon API calls in order to do that in CPython before 3.9.
Weakness: CWE-502
Which versions are affected by CVE-2022-42919?
3 open source packages ship an affected version, including libpython, python and python-min. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
libpython Bitnami | From 3.7.3 | 3.7.16, 3.8.16, 3.9.16, 3.10.9 |
python Bitnami | From 3.7.3 | 3.7.16, 3.8.16, 3.9.16, 3.10.9 |
python-min Bitnami | From 3.7.3 | 3.7.16, 3.8.16, 3.9.16, 3.10.9 |
Linux distribution packages (37)
python39 AlmaLinux:8 | All versions | 3.9.13-2.module_el8.7.0+3351+e02cdf9b |
python39-PyMySQL AlmaLinux:8 | All versions | 0.10.1-2.module_el8.6.0+2780+a40f65e1 |
python39-cffi AlmaLinux:8 | All versions | 1.14.3-2.module_el8.6.0+2780+a40f65e1 |
python39-cffi AlmaLinux:8 | All versions | 1.14.3-2.module_el8.6.0+3248+c431e88c |
python39-chardet AlmaLinux:8 | All versions | 3.0.4-19.module_el8.6.0+2780+a40f65e1 |
python39-cryptography AlmaLinux:8 | All versions | 3.3.1-2.module_el8.6.0+2780+a40f65e1 |
python39-cryptography AlmaLinux:8 | All versions | 3.3.1-2.module_el8.6.0+3248+c431e88c |
python39-devel AlmaLinux:8 | All versions | 3.9.13-2.module_el8.7.0+3351+e02cdf9b |
python39-idle AlmaLinux:8 | All versions | 3.9.13-2.module_el8.7.0+3351+e02cdf9b |
python39-idna AlmaLinux:8 | All versions | 2.10-3.module_el8.6.0+2780+a40f65e1 |
python39-libs AlmaLinux:8 | All versions | 3.9.13-2.module_el8.7.0+3351+e02cdf9b |
python39-lxml AlmaLinux:8 | All versions | 4.6.5-1.module_el8.6.0+2780+a40f65e1 |
python39-lxml AlmaLinux:8 | All versions | 4.6.5-1.module_el8.6.0+3248+c431e88c |
python39-mod_wsgi AlmaLinux:8 | All versions | 4.7.1-5.module_el8.7.0+3344+df07b58a |
python39-numpy AlmaLinux:8 | All versions | 1.19.4-3.module_el8.6.0+2780+a40f65e1 |
python39-numpy AlmaLinux:8 | All versions | 1.19.4-3.module_el8.6.0+3248+c431e88c |
python39-numpy-doc AlmaLinux:8 | All versions | 1.19.4-3.module_el8.6.0+2780+a40f65e1 |
python39-numpy-f2py AlmaLinux:8 | All versions | 1.19.4-3.module_el8.6.0+2780+a40f65e1 |
python39-numpy-f2py AlmaLinux:8 | All versions | 1.19.4-3.module_el8.6.0+3248+c431e88c |
python39-pip AlmaLinux:8 | All versions | 20.2.4-7.module_el8.6.0+2780+a40f65e1 |
python39-pip-wheel AlmaLinux:8 | All versions | 20.2.4-7.module_el8.6.0+2780+a40f65e1 |
python39-ply AlmaLinux:8 | All versions | 3.11-10.module_el8.6.0+2780+a40f65e1 |
python39-psutil AlmaLinux:8 | All versions | 5.8.0-4.module_el8.6.0+2780+a40f65e1 |
python39-psutil AlmaLinux:8 | All versions | 5.8.0-4.module_el8.6.0+3248+c431e88c |
python39-psycopg2 AlmaLinux:8 | All versions | 2.8.6-2.module_el8.7.0+3344+df07b58a |
python39-psycopg2-doc AlmaLinux:8 | All versions | 2.8.6-2.module_el8.7.0+3344+df07b58a |
python39-psycopg2-tests AlmaLinux:8 | All versions | 2.8.6-2.module_el8.7.0+3344+df07b58a |
python39-pycparser AlmaLinux:8 | All versions | 2.20-3.module_el8.6.0+2780+a40f65e1 |
python39-pysocks AlmaLinux:8 | All versions | 1.7.1-4.module_el8.6.0+2780+a40f65e1 |
python39-pyyaml AlmaLinux:8 | All versions | 5.4.1-1.module_el8.6.0+2780+a40f65e1 |
python39-pyyaml AlmaLinux:8 | All versions | 5.4.1-1.module_el8.6.0+3248+c431e88c |
python39-requests AlmaLinux:8 | All versions | 2.25.0-2.module_el8.6.0+2780+a40f65e1 |
python39-rpm-macros AlmaLinux:8 | All versions | 3.9.13-2.module_el8.7.0+3351+e02cdf9b |
python39-scipy AlmaLinux:8 | All versions | 1.5.4-3.module_el8.6.0+2780+a40f65e1 |
python39-scipy AlmaLinux:8 | All versions | 1.5.4-3.module_el8.6.0+3248+c431e88c |
python39-setuptools AlmaLinux:8 | All versions | 50.3.2-4.module_el8.6.0+2780+a40f65e1 |
python39-setuptools-wheel AlmaLinux:8 | All versions | 50.3.2-4.module_el8.6.0+2780+a40f65e1 |
Products include Fedoraproject Fedora, Python Python.
How do I fix CVE-2022-42919?
Upgrade libpython to a fixed version for your release line: 3.7.16, 3.8.16, 3.9.16 or 3.10.9.
Upgrade, and only deserialise data from trusted sources or with an allow-list of types. More about Unsafe deserialization.
Is CVE-2022-42919 being exploited?
There is no known exploitation of CVE-2022-42919 in the wild and no public exploit code.
Other vulnerabilities in Fedoraproject Fedora
Sources
Also known as ALPINE-CVE-2022-42919, ALSA-2022:8492, ALSA-2022:8493, AZL-11394, BIT-libpython-2022-42919, BIT-python-2022-42919 and 15 more.