ZeroHour

CVE-2026-85013

moderate

Shell Metacharacter Command Injection in environment-modules Bash Completion

CVSS 3.1
7.3 high
EPSS
Published
()
Modified
AI analysis

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.

Affected
Environment Modules Project (environment-modules) environment-modules
Estimated exposure
moderatetens of thousands of interactive shell users across thousands of shared HPC/research computing clusters — environment-modules is a de facto standard environment-management tool on shared HPC clusters worldwide, but it is a local CLI utility with no internet-facing footprint and no public install telemetry, so this order-of-magnitude estimate…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

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 news

No ingested article mentions this CVE yet.