CVE-2026-85013
moderateShell Metacharacter Command Injection in environment-modules Bash Completion
environment-modules contains a local OS command injection flaw (CWE-78) in the Bash completion logic for the 'module' and 'ml' commands. An attacker with write access to a directory on the victim's MODULEPATH can plant a maliciously named modulefile whose filename embeds shell metacharacters; when the victim presses Tab to complete a module command, the name is evaluated by the shell and the injected commands run with the victim's privileges, compromising that account's confidentiality, integrity, and availability (CVSS 7.3, local vector, low privileges, user interaction required). The issue primarily affects shared multi-user systems such as HPC and research computing clusters where untrusted users can write to module directories. No public proof of concept is known and no exploitation in the wild has been reported; the flaw is not listed in CISA's KEV catalog.
What to do: Apply a fixed environment-modules package from your distribution or upstream as soon as one is released, prioritizing shared multi-user systems. In the interim, audit all MODULEPATH directories for modulefiles whose names contain shell metacharacters and remove or rename them, and restrict write permissions on those directories to trusted administrators only. Also check site bash completion definitions for module/ml to confirm module names are properly quoted before evaluation.
| Environment Modules Project (environment-modules) environment-modules | — |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
A flaw was found in environment-modules. A local attacker can exploit this vulnerability by placing a maliciously named modulefile in a location visible to the victim's `MODULEPATH`. When the victim uses Bash completion for `module` or `ml` commands, the malicious module name, containing shell metacharacters, is evaluated as a command. This can lead to arbitrary command execution in the completing user's shell, impacting their confidentiality, integrity, and availability.
- Weakness
- CWE-78
- Vector
- CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
In the news0 stories
No ingested article mentions this CVE yet.