// For flags

CVE-2022-42919

python: local privilege escalation via the multiprocessing forkserver start method

Severity Score

7.8
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

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.

Python 3.9.x anterior a la versión 3.9.16 y 3.10.x anterior a la versión 3.10.9 en Linux permite la escalada de privilegios locales en una configuración no predeterminada. La librería de multiprocesamiento Python, cuando se usa con el método de inicio forkserver en Linux, permite deserializar pickles de cualquier usuario en el mismo espacio de nombres de red local de la máquina, lo que en muchas configuraciones del sistema significa cualquier usuario en la misma máquina. Pickles puede ejecutar código arbitrario. Por lo tanto, esto permite escalar los privilegios del usuario local al usuario con el que se ejecuta cualquier proceso de forkserver. Como workaround se puede configurar multiprocessing.util.abstract_sockets_supported a False. El método de inicio de forkserver para multiprocesamiento no es el método de inicio predeterminado. Este problema es específico de Linux porque solo Linux admite sockets de espacios de nombres abstractos. CPython anterior a 3.9 no utiliza sockets de espacio de nombres abstractos de Linux de forma predeterminada. Se añadió soporte para usuarios que especifican manualmente un socket de espacio de nombres abstracto como corrección de errores en 3.7.8 y 3.8.3, pero los usuarios tendrían que realizar llamadas API poco comunes específicas para poder hacerlo en CPython antes de 3.9.

A vulnerability found in Python. The flaw occurs when used with the forkserver start method on Linux. The Python multiprocessing library allows Python pickles to be deserialized from any user in the same machine's local network namespace in many system configurations, which means any user on the same machine. Pickles can execute arbitrary code. This flaw allows local user privilege escalation to the user that any Python multiprocessing forkserver process is running.

*Credits: N/A
CVSS Scores
Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2022-10-14 CVE Reserved
  • 2022-11-04 CVE Published
  • 2023-03-08 EPSS Updated
  • 2024-08-03 CVE Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-269: Improper Privilege Management
CAPEC
References (16)
URL Date SRC
URL Date SRC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Python
Search vendor "Python"
Python
Search vendor "Python" for product "Python"
>= 3.7.3 <= 3.7.15
Search vendor "Python" for product "Python" and version " >= 3.7.3 <= 3.7.15"
-
Affected
Python
Search vendor "Python"
Python
Search vendor "Python" for product "Python"
>= 3.8.3 <= 3.8.15
Search vendor "Python" for product "Python" and version " >= 3.8.3 <= 3.8.15"
-
Affected
Python
Search vendor "Python"
Python
Search vendor "Python" for product "Python"
>= 3.9.0 < 3.9.16
Search vendor "Python" for product "Python" and version " >= 3.9.0 < 3.9.16"
-
Affected
Python
Search vendor "Python"
Python
Search vendor "Python" for product "Python"
>= 3.10.0 < 3.10.9
Search vendor "Python" for product "Python" and version " >= 3.10.0 < 3.10.9"
-
Affected
Fedoraproject
Search vendor "Fedoraproject"
Fedora
Search vendor "Fedoraproject" for product "Fedora"
35
Search vendor "Fedoraproject" for product "Fedora" and version "35"
-
Affected
Fedoraproject
Search vendor "Fedoraproject"
Fedora
Search vendor "Fedoraproject" for product "Fedora"
36
Search vendor "Fedoraproject" for product "Fedora" and version "36"
-
Affected
Fedoraproject
Search vendor "Fedoraproject"
Fedora
Search vendor "Fedoraproject" for product "Fedora"
37
Search vendor "Fedoraproject" for product "Fedora" and version "37"
-
Affected