CVE-2022-35861
JSON

7.8high

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

Severity
7.8high CVSS:3.1 by NVD
Exploit likelihood
0.29% (higher than 23% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre

Description

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.)

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
pyenv pyenvfrom 1.2.24 up to 2.3.2NVD

All scores

NVD7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD4.6medium CVSS:2.0AV:L/AC:L/Au:N/C:P/I:P/A:P

Classification

What each source says

CVE List

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.)

NVD (es)

pyenv versiones 1.2.24 hasta 2.3.2, permite a usuarios locales conseguir privilegios por medio de un archivo .python-version en el directorio de trabajo actual. Un atacante puede diseñar una cadena de versión de Python en .python-version para ejecutar shims bajo su control. (Los shims son ejecutables que pasan un comando a una versión específica de pyenv. La cadena de versión es usada para construir la ruta al comando, y no es comprobado si la versión especificada es una versión válida. Por lo tanto, puede producirse un salto de rutas relativo)

References

Sources

SourceRecordLicence
CVE ListCVE-2022-35861 changed 2024-08-03CVE Terms of Use
NVDCVE-2022-35861 changed 2026-06-17Public domain