CVE-2022-42919: 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.
High CVSS 7.8
- CVE id
- CVE-2022-42919
- Published
- Last modified
Affected packages
| Package | Affected versions | Fixed in |
|---|---|---|
| Python Runtimes and servers |
>= 3.7.3, <= 3.7.15 >= 3.8.3, <= 3.8.15 >= 3.9.0, < 3.9.16 >= 3.10.0, < 3.10.9 |
3.9.16, 3.10.9 |
How to fix it
Upgrade Python to the fixed release of the line you run: 3.9.16, 3.10.9.
python --version
- Install the patched Python release of your minor line (pyenv, the python image tag, or your OS packages) and recreate virtual environments.
A free AIssue account reads the runtime versions your repositories pin (version files, Dockerfiles, build files) and tells you when one is affected.
Details
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.abstractsocketssupported 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.
References
- CVE-2022-42919 on the NVD
- Advisory: https://nvd.nist.gov/vuln/detail/CVE-2022-42919
- Web: https://github.com/python/cpython/compare/v3.10.8...v3.10.9
- Web: https://github.com/python/cpython/compare/v3.9.15...v3.9.16
- Web: https://github.com/python/cpython/issues/97514
- Web: https://github.com/python/cpython/issues/97514#issuecomment-1310277840
- Web: https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/FKGCQPIVHEAIJ77R3RSNSQWYBUDVWDKU/
- Web: https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/P2LHWWEI5OBQ6RELULMVU6KMDYG4WZXH/
- Web: https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/PI5DYIED6U26BGX5IRZWNCP6TY4M2ZGZ/
- Web: https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/QLUGZSEAO3MBWGKCUSMKQIRYJZKJCIOB/
- Web: https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/R6KGIRHSENZ4QAB234Z36HVIDTRJ3MFI/
- Web: https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/RDK3ZZBRYFO47ET3N4BNTKVXN47U6ICY/
- Web: https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VCRKBB5Y5EWTJUNC7LK665WO64DDXSTN/
- Web: https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XX6LLAXGZVZ327REY6MDZRMMP47LJ53P/
- Web: https://security.gentoo.org/glsa/202305-02
- Web: https://security.netapp.com/advisory/ntap-20221209-0006/
- Web: https://github.com/python/cpython/compare/v3.10.8...v3.10.9
- Web: https://github.com/python/cpython/compare/v3.9.15...v3.9.16
- Web: https://github.com/python/cpython/issues/97514
- Web: https://github.com/python/cpython/issues/97514#issuecomment-1310277840
- Web: https://lists.debian.org/debian-lts-announce/2024/12/msg00000.html
Am I affected?
Upload or paste your lockfile. We check every package version in it against OSV.dev, this advisory included, and email you the vulnerable ones with the version that fixes them. Free, and no account needed.
About this data
Source: National Vulnerability Database (NVD) (public domain). Severity comes from the advisory's own rating when it has one, else from its CVSS score.