CVSS 5.4 MEDIUM RCE

Pylint: Arbitrary code execution via pickle deserialization of the stats cache in PYLINT_HOME

Mã khác
GHSA-22qq-2fwx-7p67
Công bố
Cập nhật
Lần đầu thấy
Nguồn
GitHub Advisory, OSV.dev

Mô tả

Impact

Since 2006 / pylint 0.15.2, pylint caches its stats as pickles in PYLINT_HOME and reload them on the next run with pickle.load. Someone without access to the configuration or linted code, but with access to the cache directory (predictable PYLINT_HOME on a multi-user host) can write a crafted pickle that will runs arbitrary code when pylint access its stat cache.

Patches

From pylint 4.0.9, the result cache is now stored as JSON instead of pickle, preventing code-execution.

Workarounds

Until upgrading do not point PYLINT_HOME to an untrusted, shared, or group-writable directory. The default value, ~/.cache/pylint, is writable only by the user running pylint.

Credits
  • Reported privately via Tidelift coordinated disclosure (Dan Lenz).

Điểm và phân loại

CVSS
5.4 MEDIUM v4.0
Nguồn điểm
GitHub Advisory
Mức độ (theo nguồn)
MEDIUM
EPSS
0.11%
CWE
CWE-502

Vector CVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Ảnh hưởng

Package Bản bị ảnh hưởng Bản đã sửa
pip pylint < 4.0.9 4.0.9

Vì sao bị lọc

  • CVSS 5.4 < 8.0 và không thuộc CISA KEV

Loại tác động

RCE
CWE-502; từ khoá "arbitrary code execution"

Dữ liệu riêng của nguồn

OSV.dev · ID
GHSA-22qq-2fwx-7p67

Tham khảo