CVE Database›Document archive›CVE-2026-85013

CVE-2026-85013

environment-modules: Command injection in environment-modules Bash completion via malicious module names containing shell metacharacters

Loading…

Severity

Moderate

Red Hat Product Security

7.3

CVSS 3.1

Review impact separately from score.

Published · September 15, 2026

Updated · October 19, 2026

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.

Statement

This Moderate impact flaw in environment-modules allows a local attacker to execute arbitrary commands by crafting malicious module names. Exploitation requires the attacker to influence the MODULEPATH and the victim to use Bash completion for module or ml commands, triggering the vulnerability through user interaction. This limits the broad exploitability, aligning with a Moderate classification.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

To mitigate this issue, avoid enabling Bash completion for module and ml in environments where untrusted users can influence MODULEPATH. Additionally, ensure that shared module search paths do not include attacker-writable directories. As a practical measure, the affected completion script can be removed or disabled by commenting out its sourcing in shell configuration files (e.g., ~/.bashrc or /etc/profile.d/). Users must start a new shell session for changes to take effect.

CVSS / CWE

CVSS 3.1 · 7.3
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H

CWE-78 · Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')