# CVE-2026-85013: Environment-modules: command injection in environment-modules bash completion via malicious module names containing shell metacharacters

Status: published. Published: 2026-09-15. Updated: 2026-11-06.

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.

## Remediation

- 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. (source: CNA: redhat)

## Affected products and versions

- Red Hat / Red Hat Enterprise Linux 10 (environment-modules): ≥ 0:5.6.1-2.el10_2.1; < * (unaffected, rpm). Source: CNA: redhat
- Red Hat / Red Hat Enterprise Linux 8 (environment-modules): ≥ 0:4.5.2-5.el8_10; < * (unaffected, rpm). Source: CNA: redhat
- Red Hat / Red Hat Enterprise Linux 9 (environment-modules): ≥ 0:5.3.0-2.el9_8.1; < * (unaffected, rpm). Source: CNA: redhat
- Red Hat / Red Hat Hardened Images (environment-modules-main): ≥ 5.6.2-1.hum1; < * (unaffected, rpm). Source: CNA: redhat
- Red Hat / Red Hat Enterprise Linux 6 (environment-modules): Version range not reported. Source: CNA: redhat
- Red Hat / Red Hat Enterprise Linux 7 (environment-modules): Version range not reported. Source: CNA: redhat

## Severity and prioritization

- CVSS 3.1: 7.3 (high); CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H; source: CNA: redhat

- CISA KEV: No listing in collected sources

- EPSS: 0.23% as of 2026-11-05; percentile 13.93%

- SSVC: exploitation poc; automatable no; technical impact total; source ADP: CISA-ADP

- Weaknesses: CWE-78

## Exploit evidence

- exploit: https://github.com/envmodules/modules/security/advisories/GHSA-8hrw-p88g-qhmg (ADP: CISA-ADP)

## References

- https://access.redhat.com/errata/RHSA-2026:64766 (CNA: redhat; vendor-advisory, x_refsource_REDHAT)

- https://access.redhat.com/errata/RHSA-2026:80664 (CNA: redhat; vendor-advisory, x_refsource_REDHAT)

- https://access.redhat.com/errata/RHSA-2026:82919 (CNA: redhat; vendor-advisory, x_refsource_REDHAT)

- https://access.redhat.com/errata/RHSA-2026:84594 (CNA: redhat; vendor-advisory, x_refsource_REDHAT)

- https://access.redhat.com/security/cve/CVE-2026-85013 (CNA: redhat; vdb-entry, x_refsource_REDHAT)

- https://bugzilla.redhat.com/show_bug.cgi?id=2465635 (CNA: redhat; issue-tracking, x_refsource_REDHAT)

- https://github.com/envmodules/modules/security/advisories/GHSA-8hrw-p88g-qhmg (CNA: redhat)

- https://github.com/envmodules/modules/security/advisories/GHSA-8hrw-p88g-qhmg (ADP: CISA-ADP; exploit)

## Provenance

- CNA: redhat: https://www.cve.org/CVERecord?id=CVE-2026-85013; retrieved 2026-11-06; source updated 2026-11-06

- FIRST EPSS: https://api.first.org/data/v1/epss?cve=CVE-2026-85013; retrieved 2026-11-06; source updated Not reported

Revision: 264e0428061f7fdde38753711be70f21b0440c6fc8f354a452e79ab3893b05a5

Canonical: https://y2.dev/cve/CVE-2026-85013

## Agent and API access

Public CVE pages, Markdown, and JSON are free to read without an account or API key.

- Public catalog: https://y2.dev/cve/index.json. Follow nextCursor with the same search, filters, sort, and limit (1–100). A null cursor marks the end.

- WebMCP: search_cve_disclosures, get_cve_disclosure, get_cve_page_markdown, get_y2_cve_access. Available in compatible browsers.

- Cyber API: https://api.y2.dev/api/v2/cyber/cves and https://api.y2.dev/api/v2/cyber/cves/{cveId}.

- Y2 Pro or Elite: create a workspace API key with the intel:cyber scope and send Authorization: Bearer <Y2_API_KEY>. Setup: https://y2.dev/docs/api/create-key.

- x402: Pay per request without an account or API key. Omit Authorization, read the HTTP 402 PAYMENT-REQUIRED challenge, validate its current requirements, and retry with PAYMENT-SIGNATURE through an authorized payment client. These browser tools never make payments. Guide: https://y2.dev/docs/api/x402.

- OpenAPI: https://y2.dev/api/openapi.yaml. Agent access metadata: https://y2.dev/cve/agent.json.

Collected public records only. Check source status for coverage and freshness.