Every CVE Search/ Get API key

CVE-2022-35861

pyenv 1.2.24 through 2.3.2 allows local users to gain privileges via a .python-version file in...

7.8 HighFix available

pyenv 1.2.24 through 2.3.2 allows local users to gain privileges via a .python-version file in the current working directory. An attacker can craft a Python version string in .python-version to execute shims under their control. (Shims are executables that pass a command along to a specific version of pyenv. The version string is used to construct the path to the command, and there is no validation of whether the version specified is a valid version. Thus, relative path traversal can occur.)

Attack profile

How easy it is to exploit

Attack vector
Local
Complexity
Low
Privileges needed
Low
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

0.29%Down 0.6 points since Jul 18, 2022
90%50%10%1%

What each source reports

NVD Score used 7.8

pyenv 1.2.24 through 2.3.2 allows local users to gain privileges via a .python-version file in the current working directory. An attacker can craft a Python version string in .python-version to execute shims under their control. (Shims are executables that pass a command along to a specific version of pyenv. The version string is used to construct the path to the command, and there is no validation of whether the version specified is a valid version. Thus, relative path traversal can occur.)

Record
CVE-2022-35861
CVSS 3.1
7.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS 2.0
4.6 MediumAV:L/AC:L/Au:N/C:P/I:P/A:P
Weakness
CWE-22
Updated
2026-11-02
CVE List No score

pyenv 1.2.24 through 2.3.2 allows local users to gain privileges via a .python-version file in the current working directory. An attacker can craft a Python version string in .python-version to execute shims under their control. (Shims are executables that pass a command along to a specific version of pyenv. The version string is used to construct the path to the command, and there is no validation of whether the version specified is a valid version. Thus, relative path traversal can occur.)

Record
CVE-2022-35861
Updated
2026-11-02
EUVDEUVD-2022-38734 No score

pyenv 1.2.24 through 2.3.2 allows local users to gain privileges via a .python-version file in the current working directory. An attacker can craft a Python version string in .python-version to execute shims under their control. (Shims are executables that pass a command along to a specific version of pyenv. The version string is used to construct the path to the command, and there is no validation of whether the version specified is a valid version. Thus, relative path traversal can occur.)

Record
EUVD-2022-38734
Updated
2026-11-03
GitHub AdvisoriesGHSA-7rf7-7xf5-v9v3 7.8

pyenv 1.2.24 through 2.3.2 allows local users to gain privileges via a .python-version file in...

pyenv 1.2.24 through 2.3.2 allows local users to gain privileges via a .python-version file in the current working directory. An attacker can craft a Python version string in .python-version to execute shims under their control. (Shims are executables that pass a command along to a specific version of pyenv. The version string is used to construct the path to the command, and there is no validation of whether the version specified is a valid version. Thus, relative path traversal can occur.)

Record
GHSA-7rf7-7xf5-v9v3
CVSS 3.1
7.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-22
Updated
2026-11-02
OSV No score

pyenv 1.2.24 through 2.3.2 allows local users to gain privileges via a .python-version file in the current working directory. An attacker can craft a Python version string in .python-version to execute shims under their control. (Shims are executables that pass a command along to a specific version of pyenv. The version string is used to construct the path to the command, and there is no validation of whether the version specified is a valid version. Thus, relative path traversal can occur.)

Record
CVE-2022-35861
Updated
2026-11-02
OSVopenSUSE-SU-2022:10183-1 No score

Security update for pyenv

This update for pyenv fixes the following issues:

Update to 2.3.5

  • Add CPython 3.10.7 by @edgarrmondragon in #2454
  • Docs: update Fish PATH update by @gregorias in #2449
  • Add CPython 3.7.14, 3.8.14 and 3.9.14 by @edgarrmondragon in #2456
  • Update miniconda3-3.9-4.12.0 by @Tsuki in #2460
  • Add CPython 3.11.0rc2 by @ViktorHaag in #2459
  • Add patches for 3.7.14 to support Apple Silicon by @samdoran in #2463
  • Add ability to easily skip all use of Homebrew by @samdoran in #2464
  • Drop Travis integration by @sobolevn in #2468
  • Build CPython 3.12+ with --with-dsymutil in MacOS by @native-api in #2471
  • Add Pyston 2.3.5 by @scop in #2476 Full Changelog: https://github.com/pyenv/pyenv/compare/v2.3.4...v2.3.5

Update to 2.3.4

  • Add CPython 3.11.0rc1 by @edgarrmondragon in #2434
  • Add support for multiple versions in pyenv uninstall by @hardikpnsp in #2432
  • Add micropython 1.18 and 1.19.1 by @dmitriy-serdyuk in #2443
  • CI: support Micropython, deleted scripts; build with -v by @native-api in #2447
  • Re-allow paths in .python-version while still preventing CVE-2022-35861 by @comrumino in #2442
  • CI: Bump OS versions by @native-api in #2448
  • Add Cinder 3.8 by @filips123 in #2433
  • Add support for multiple versions in pyenv uninstall in #2432
  • Add micropython 1.18 and 1.19.1 in #2443
  • Add Cinder 3.8 in #2433

Update to 2.3.3

  • Use version sort in pyenv versions by @fofoni in #2405
  • Add CPython 3.11.0b4 by @majorgreys in #2411
  • Python-build: Replace deprecated git protocol use with https in docs by @ssbarnea in #2413
  • Fix relative path traversal due to using version string in path by @comrumino in #2412
  • Allow pypy2 and pypy3 patching by @brogon in #2421, #2419
  • Add CPython 3.11.0b5 by @edgarrmondragon in #2420
  • Add GraalPython 22.2.0 by @msimacek in #2425
  • Add CPython 3.10.6 by @edgarrmondragon in #2428
  • Add CPython 3.11.0b4 by @majorgreys in #2411
  • Replace deprecated git protocol use with https by @ssbarnea in docs #2413
  • Fix relative path traversal due to using version string in path by @comrumino in #2412
  • Fix patterns for pypy2./pypy3. versions by @brogon in #2419

Update to 2.3.2

  • Add CPython 3.11.0b2 by @saaketp in #2380
  • Honor CFLAGS_EXTRA for MicroPython #2006 by @yggdr in #2007
  • Add post-install checks for curses, ctypes, lzma, and tkinter by @aphedges in #2353
  • Add CPython 3.11.0b3 by @edgarrmondragon in #2382
  • Add flags for Homebrew into python-config --ldflags by @native-api in #2384
  • Add CPython 3.10.5 by @illia-v in #2386
  • Add Anaconda 2019.10, 2021.04, 2022.05; support Anaconda in add_miniconda.py by @native-api in #2385
  • Add Pyston-2.3.4 by @dand-oss in #2390
  • Update Anaconda3-2022.05 MacOSX arm64 md5 by @bkbncn in #2391
  • Fix boo#1201582 to fix CVE-2022-35861 (from commit 22fa683, file pyenv-CVE-2022-35861.patch)

Update to 2.3.0

  • Bump openssl 1.1 to 1.1.1n for CPython 3.7 3.8 3.9 by @tuzi3040 in #2276
  • Doc Fix: Escape a hash character causing unwanted GitHub Issue linking by @edrogers in #2282
  • Add CPython 3.9.12 by @saaketp in #2296
  • Add CPython 3.10.4 by @saaketp in #2295
  • Add patch for 3.6.15 to support Xcode 13.3 by @nshine in #2288
  • Add patch for 3.7.12 to support Xcode 13.3 by @samdoran in #2292
  • Add CONTRIBUTING.md by @native-api in #2287
  • Add PyPy 7.3.9 release 2022-03-30 by @dand-oss in #2308
  • Add Pyston 2.3.3 by @scop in #2316
  • Add CPython 3.11.0a7 by @illia-v in #2315
  • Add 'nogil' Python v3.9.10 by @colesbury in #2342
  • Support XCode 13.3 in all releases that officially support MacOS 11 by @native-api in #2344
  • Add GraalPython 22.1.0 by @msimacek in #2346
  • Make PYENV_DEBUG imply -v for pyenv install by @native-api in #2347
  • Simplify init scheme by @native-api in #2310
  • Don't use Homebrew outside of MacOS by @native-api in #2349
  • Add :latest syntax to documentation for the install command by @hay in #2351

Update to 2.2.5

  • fix issue 2236 for CPython 3.6.15 and 3.7.12 by @fofoni in #2237
  • python-build: add URL for get-pip for Python 3.6…
Record
openSUSE-SU-2022:10183-1
Updated
2026-11-02
OSVopenSUSE-SU-2024:12200-1 No score

pyenv-2.3.2-1.1 on GA media

These are all security issues fixed in the pyenv-2.3.2-1.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2024:12200-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
pyenv
SUSE:Package Hub 15 SP4
before 2.3.5-bp154.2.3.1
2.3.5-bp154.2.3.1
pyenv
openSUSE:Leap 15.4
before 2.3.5-bp154.2.3.1
2.3.5-bp154.2.3.1

History

History
RecordedChangedSources
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2022-35861 is a high vulnerability (CVSS 7.8) in Pyenv, published July 17, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.29%, the 21st percentile. Fixed in pyenv 2.3.5-bp154.2.3.1.

References

This page doesn't list everything

Left out here: the rest of 1 source description. The JSON record has them.

MoveEnter Open