CVE-2026-95168
Deferred Deferred - Pending Action

Code Execution in TheFuck via Malicious Rule Path

Vulnerability report for CVE-2026-95168, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-10-20

Last updated on: 2026-10-21

Assigner: MITRE

Description

An issue in nvbn thefuck v.3.32 allows a local attacker to execute arbitrary code via the get_rules_import_paths in thefuck/corrector.py and Rule.from_path in thefuck/types.py

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-10-20
Last Modified
2026-10-21
Generated
2026-11-10
AI Q&A
2026-10-20
EPSS Evaluated
2026-11-08
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
n/a n/a n/a

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-94 The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

CVE-2026-95168 is a vulnerability in the Python package 'thefuck' up to version 3.32. It allows arbitrary code execution in shared environments where multiple users access the same Python interpreter. The issue occurs because thefuck scans all directories in sys.path for packages named thefuck_contrib_* and executes their code during startup, before any enable-gating checks. This means a lower-privileged user can plant a malicious contrib package that executes code whenever another user runs thefuck.

Detection Guidance

Check for unexpected thefuck_contrib_* packages in sys.path directories by running: find $(python -c 'import sys; print(" ".join(sys.path))') -name 'thefuck_contrib_*' 2>/dev/null. Also inspect startup logs for thefuck commands for unexpected file writes or executions.

Impact Analysis

On shared systems like multi-user servers or shared virtual environments, this vulnerability allows a lower-privileged user to execute arbitrary code in the context of other users running thefuck. This could lead to unauthorized access, data theft, or system compromise. Attackers can exploit it by placing a malicious package in a writable sys.path directory.

Compliance Impact

This vulnerability primarily impacts shared or multi-user environments where arbitrary code execution could lead to unauthorized data access or modification. For GDPR, it may violate principles of data protection by design and default if user data is exposed. Under HIPAA, it could risk unauthorized access to protected health information if exploited in healthcare systems. The lack of input validation and unrestricted code execution may also conflict with compliance requirements for secure software development.

Mitigation Strategies

Upgrade thefuck to a patched version if available. Restrict write access to directories in sys.path. Temporarily disable contrib packages by setting THEFUCK_NO_CONTRIB=1 in the environment. Review sys.path for untrusted entries and remove writable paths if possible.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-95168. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...