Impact
An attacker with local access can trigger arbitrary code execution by influencing the get_rules_import_paths function in thefuck/corrector.py and the Rule.from_path constructor in thefuck/types.py. The code paths allow the application to import modules based on unvalidated file system paths, providing a direct vector for executing injected code. The weakness is an improper validation of dynamically loaded code, mapped to CWE‑94 and CWE‑427.
Affected Systems
The vulnerability is specific to the Python package "thefuck" released by nvbn. Version 3.32 is affected. No other vendor or product variants are listed.
Risk and Exploitability
The EPSS score is low, at < 1%, and the CVSS score is 7.8. The vulnerability is not enumerated in the CISA KEV catalog. The attack vector requires local access to the environment where thefuck runs; privilege escalation is possible if the user has elevated rights. Because the vulnerability involves dynamic code import, exploitation is straightforward once the paths are controllable, but the overall risk hinges on the system privileges of the user executing thefuck.
OpenCVE Enrichment