Skip to main content

CVE-2022-42919: n/a in n/a

High
VulnerabilityCVE-2022-42919cvecve-2022-42919
Published: Sun Nov 06 2022 (11/06/2022, 00:00:00 UTC)
Source: CVE
Vendor/Project: n/a
Product: n/a

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.

AI-Powered Analysis

AILast updated: 07/03/2025, 07:12:25 UTC

Technical Analysis

CVE-2022-42919 is a high-severity local privilege escalation vulnerability affecting Python versions 3.9.x prior to 3.9.16 and 3.10.x prior to 3.10.9 on Linux systems. The vulnerability arises from the Python multiprocessing library's forkserver start method, which uses Linux abstract namespace sockets to communicate. In this configuration, the forkserver process deserializes pickled data from any user within the same machine's local network namespace. Since pickles can execute arbitrary code during deserialization, a local attacker can craft malicious pickle payloads to execute arbitrary code with the privileges of the forkserver process. This effectively allows a local user to escalate their privileges to those of the forkserver process user, which is often a higher-privileged user. The forkserver start method is not the default multiprocessing start method, and this issue is Linux-specific due to the use of abstract namespace sockets, a Linux-only feature. Earlier Python versions before 3.9 do not use abstract namespace sockets by default, and manual use of this feature was uncommon. A temporary mitigation involves setting the multiprocessing.util.abstract_sockets_supported flag to False, disabling the use of abstract namespace sockets. The vulnerability is tracked under CWE-502 (Deserialization of Untrusted Data) and has a CVSS v3.1 score of 7.8, indicating high severity. No known exploits are reported in the wild as of the published date. The vulnerability requires local access and does not require user interaction, but the attack complexity is low given the ability to send malicious pickles within the same machine namespace.

Potential Impact

For European organizations, this vulnerability poses a significant risk particularly in multi-user Linux environments where Python multiprocessing with the forkserver start method is used. Organizations running Python-based applications or services that utilize multiprocessing in this mode could face unauthorized privilege escalation, potentially leading to full system compromise or lateral movement within internal systems. This is especially critical for shared hosting providers, research institutions, universities, and enterprises with multi-tenant Linux servers. Confidentiality, integrity, and availability of affected systems could be severely impacted if an attacker gains elevated privileges. The vulnerability's local nature limits remote exploitation but insider threats or compromised low-privilege accounts could leverage this flaw to escalate privileges. Given Python's widespread use in European IT infrastructures, particularly in scientific computing, web services, and automation, the vulnerability could affect a broad range of sectors including finance, healthcare, government, and critical infrastructure. The lack of known exploits in the wild reduces immediate risk but does not eliminate the threat, as attackers may develop exploits over time.

Mitigation Recommendations

European organizations should first identify any Linux systems running vulnerable Python versions (3.9.x before 3.9.16 and 3.10.x before 3.10.9) and assess whether the multiprocessing forkserver start method is used. If so, immediate mitigation steps include: 1) Upgrading Python to versions 3.9.16 or 3.10.9 or later where the vulnerability is patched. 2) If upgrading is not immediately feasible, set the environment variable or programmatically set multiprocessing.util.abstract_sockets_supported to False to disable abstract namespace socket usage, preventing the vulnerability exploitation. 3) Restrict local user access to systems where multiprocessing forkserver is used to trusted users only, minimizing the risk of malicious pickle injection. 4) Implement strict monitoring and logging of multiprocessing usage and suspicious pickle deserialization activities. 5) Conduct internal audits to identify any use of the forkserver start method and refactor code to use safer multiprocessing start methods such as spawn or fork where possible. 6) Educate developers and system administrators about the risks of untrusted pickle deserialization and enforce secure coding practices. 7) Employ mandatory access controls (e.g., SELinux, AppArmor) to limit the privileges of forkserver processes and contain potential exploitation.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
mitre
Date Reserved
2022-10-14T00:00:00.000Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682d9838c4522896dcbebcb8

Added to database: 5/21/2025, 9:09:12 AM

Last enriched: 7/3/2025, 7:12:25 AM

Last updated: 7/5/2025, 9:32:12 PM

Views: 5

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats