CVE-2026-85013Environment-modules: command injection in environment-modules bash completion via…
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.
What to do
Fixed builds are available from AlmaLinux, Debian, Red Hat, Rocky Linux: see the table below for the fixed version per release.
Debian, Red Hat, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | modules | Fix pending | UBUNTU-CVE-2026-85013 | |
| Ubuntu 26.04 | modules | Fix pending | UBUNTU-CVE-2026-85013 | |
| Ubuntu 24.04 | modules | Under investigation | UBUNTU-CVE-2026-85013 | |
| Ubuntu 22.04 | modules | Under investigation | UBUNTU-CVE-2026-85013 | |
| Ubuntu 20.04 | modules | Fix pending | UBUNTU-CVE-2026-85013 | |
| Ubuntu 18.04 | modules | Fix pending | UBUNTU-CVE-2026-85013 | |
| Ubuntu 16.04 | modules | Fix pending | UBUNTU-CVE-2026-85013 | |
| Debian 14 | modules | Fixed | 5.6.1-3 | DEBIAN-CVE-2026-85013 |
| Debian 13 | modules | Fix pending | DEBIAN-CVE-2026-85013 | |
| Debian 12 | modules | Fix pending | DEBIAN-CVE-2026-85013 | |
| Red Hat Enterprise Linux 10 | environment-modules | Fixed | 0:5.6.1-2.el10_2.1 | RHSA-2026:98565 |
| Red Hat Enterprise Linux 9 | environment-modules | Fixed | 0:5.3.0-2.el9_8.1 | RHSA-2026:98460 |
| Red Hat Enterprise Linux 8 | environment-modules | Fixed | 0:4.5.2-5.el8_10 | RHSA-2026:82919 |
| Red Hat Enterprise Linux 7 | environment-modules | Fix pending Affected | ||
| Red Hat Enterprise Linux 6 | environment-modules | Will not fix Out of support scope | ||
| AlmaLinux 10 | environment-modules | Fixed | 5.6.1-3.el10_3 | ALSA-2026:80664 |
| AlmaLinux 9 | environment-modules | Fixed | 5.3.0-3.el9_9 | ALSA-2026:84594 |
| AlmaLinux 8 | environment-modules | Fixed | 4.5.2-5.el8_10 | ALSA-2026:82919 |
| Rocky Linux 10 | environment-modules | Fixed | 0:5.6.1-3.el10_3 | RLSA-2026:80664 |
| Rocky Linux 9 | environment-modules | Fixed | 0:5.3.0-2.el9_8.1 | RLSA-2026:98460 |
| Rocky Linux 8 | environment-modules | Fixed | 0:4.5.2-5.el8_10 | RLSA-2026:82919 |
What the vendor says
As published in the CVE record by redhat, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- Red Hat Enterprise Linux 10
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- Red Hat Hardened Images
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- Red Hat OpenShift AI (RHOAI)
Workaround: 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.
Vendor advisories:
- https://access.redhat.com/errata/RHSA-2026:64766 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2026:80664 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2026:82919 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2026:84594 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2026:98460 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2026:98565 (vendor-advisory)
References
- https://access.redhat.com/errata/RHSA-2026:64766
- https://access.redhat.com/errata/RHSA-2026:80664
- https://access.redhat.com/errata/RHSA-2026:82919
- https://access.redhat.com/errata/RHSA-2026:84594
- https://access.redhat.com/errata/RHSA-2026:98460
- https://access.redhat.com/errata/RHSA-2026:98565
- https://access.redhat.com/security/cve/CVE-2026-85013
- https://bugzilla.redhat.com/show_bug.cgi?id=2465635
- https://github.com/envmodules/modules/security/advisories/GHSA-8hrw-p88g-qhmg
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.