CWE data temporarily unavailableCWE data is currently experiencing intermittent outages, which may cause incomplete section loading on CVE pages. We are actively working on a fix.

CVE-2026-95168

Description

A flaw was found in thefuck. This vulnerability allows a local attacker to execute arbitrary code by supplying malicious rule files through insecure import path resolution. When the application loads rules, it evaluates code from untrusted paths, leading to unauthorized code execution with the privileges of the user running the utility.

Statement

This vulnerability is rated as an Important severity because it enables an unprivileged local attacker to achieve arbitrary code execution in the context of the user running the utility, provided the user interacts with a specially crafted environment. The thefuck package is not shipped in Red Hat Enterprise Linux and is only distributed through community repositories such as Fedora and EPEL. Systems running standard Red Hat Enterprise Linux installations are therefore not impacted by this flaw.

Mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.

--- CME Mitigation Guidance (2026-10-20) ---
Disclaimer: The following mitigation solutions are provided as a courtesy, pending the application of an official patch. This content was generated utilizing AI tools in conjunction with data from https://cmetaxonomy.org. Customers are advised to independently evaluate and test these temporary mitigations within their own infrastructure.

The highest-value action is to eliminate automatic discovery and top-level code execution of rule modules from untrusted sys.path directories in thefuck prior to enablement gating: upgrade to the fixed Thefuck builds, which restrict loading third-party rules to directories not writable by other users, closing planting a crafted thefuck_contrib_* package in a writable sys.path directory. Until patched, this is only a concern on Linux systems where multiple users share Python environments or where sys.path directories are writable by untrusted users — Standard Red Hat Enterprise Linux installations without Fedora or EPEL packages are unaffected — so Audit and restrict write permissions across all directories in sys.path, shared virtual environments, and group-writable site-packages to prevent untrusted users from placing files. As a compensating measure, Audit process spawn and file access events via auditd when rule modules in sys.path are loaded and executed, Enforce SELinux in enforcing mode with confined user mappings to bound execution privileges and restrict unauthorized operations, Restrict filesystem access paths via Landlock LSM sandboxing to prevent reading or importing from untrusted writable directories, Isolate filesystem mount namespaces to prevent the application from resolving modules planted in shared or world-writable directories, Deploy endpoint detection and response agents to detect anomalous child process execution or suspicious behavioral activity during rule import, and Monitor kernel syscall activity using Falco or eBPF runtime security to detect unexpected process spawns from imported rules. These controls limit blast radius and contain exploitation, but they do not fix the underlying insecure rule loading defect — apply the upstream patch to fully remediate.

Highest-impact CME: CME-301 SELinux (Enforcing Mode) (medium)

Frequently Asked Questions

Want to get errata notifications? Sign up here.