CVE-2022-35861
Homebrew vulnerability analysis and mitigation

Overview

pyenv versions 1.2.24 through 2.3.2 contain a local privilege escalation vulnerability through the .python-version file in the current working directory. The vulnerability allows local users to gain elevated privileges by crafting a malicious Python version string in the .python-version file (NVD).

Technical details

The vulnerability stems from insufficient validation of version strings in .python-version files. When pyenv processes these files, it uses the version string to construct the path to command shims without properly validating whether the specified version is legitimate. This oversight enables relative path traversal attacks through carefully crafted version strings (NVD). The vulnerability has been assigned a CVSS v3.1 Base Score of 7.8 (HIGH) with the vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H (NVD).

Impact

If exploited, this vulnerability allows attackers to execute shims under their control, potentially leading to privilege escalation on the affected system. The vulnerability affects local users who can create or modify .python-version files, potentially compromising system security (NVD).

Mitigation and workarounds

The vulnerability has been patched in the pyenv codebase. The fix includes additional validation of version strings to prevent path traversal attacks by skipping dubious values that contain path separators or relative path components. The patch was implemented in commit 22fa683 (Pyenv Patch).

Additional resources


SourceThis report was generated using AI

Related Homebrew vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-14330CRITICAL9.8
  • NixOSNixOS
  • cpe:2.3:a:mozilla:firefox_esr
NoYesDec 09, 2025
CVE-2025-14329HIGH8.8
  • NixOSNixOS
  • cpe:2.3:a:mozilla:firefox:*:*:*:*:esr:*:*:*
NoYesDec 09, 2025
CVE-2025-14333HIGH8.1
  • NixOSNixOS
  • firefox
NoYesDec 09, 2025
CVE-2025-14332HIGH7.3
  • NixOSNixOS
  • firefox
NoYesDec 09, 2025
CVE-2025-14331MEDIUM6.5
  • NixOSNixOS
  • firefox
NoYesDec 09, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management