EEF-CVE-2026-81856

Source
https://cna.erlef.org/osv/EEF-CVE-2026-81856.html
Import Source
https://cna.erlef.org/osv/EEF-CVE-2026-81856.json
JSON Data
https://api.osv.dev/v1/vulns/EEF-CVE-2026-81856
Aliases
  • CVE-2026-81856
  • GHSA-fpmj-3cxg-p766
Published
2026-10-12T15:46:12Z
Modified
2026-10-12T16:11:11Z
Severity
  • 2.3 (Low) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N CVSS Calculator
Summary
Terminal escape sequence injection in Hex via unneutralized server-supplied output
Details

Summary

Improper Neutralization of Escape, Meta, or Control Sequences vulnerability in hexpm hex allows a malicious package publisher or a hostile repository server to inject terminal control sequences into the output of Mix tasks.

Hex prints strings supplied by the package repository and the documentation search service straight to the terminal through Hex.Shell.info/1 and Hex.Shell.error/1, neutralizing no control characters. Affected sinks span package metadata and configuration snippets in mix hex.info, search results in mix hex.package search and mix hex.search, owner and organization listings, publish and sponsor URLs, the authenticated username in mix hex.user, policy identities in mix hex.policy, and API error bodies rendered by Hex.Utils.print_error_result/1. A malicious package can embed ANSI escape sequences (cursor movement, line erase, carriage returns, OSC 52 clipboard writes) or Unicode bidirectional overrides in any of those fields, so the bytes reach the terminal unchanged, forging displayed URLs, package descriptions and suggested commands, concealing real output, or writing to the clipboard. No authentication or privileged position is required; only publishing a package.

This issue affects hex: from 0.0.1 before 2.5.2.

Impact

A malicious package publisher can forge what a developer sees when running mix hex.search, rewriting the displayed hexdocs URL or a suggested command, concealing real output, or writing attacker-chosen text to the clipboard through OSC 52. Any developer who runs a documentation search that surfaces the attacker's package is affected.

Configurations

Reachable only when a developer runs an affected Mix task in a terminal emulator that interprets ANSI escape sequences, and the printed content originates from an attacker-published package or a hostile repository server.

Solutions

Upgrade Hex to 2.5.2 or later, for example with mix local.hex. Hex then escapes terminal control characters in text from hex.pm and the registry before printing it, and rejects registry dependencies whose package or repository name isn't a valid name.

Database specific
{
    "capec_ids": [
        "CAPEC-93"
    ],
    "cpe_ids": [
        "cpe:2.3:a:hexpm:hex:*:*:*:*:*:*:*:*"
    ],
    "cwe_ids": [
        "CWE-150"
    ]
}
References
Credits
    • Zach Daniel - REPORTER
    • Eric Meadows-Jönsson - REMEDIATION_REVIEWER
    • Jonatan Männchen - REMEDIATION_DEVELOPER
    • Jonatan Männchen - COORDINATOR

Affected packages

Git / github.com/hexpm/hex

Affected ranges

Type
GIT
Repo
https://github.com/hexpm/hex
Events

Affected versions

v0.*
v0.0.1
v0.1.0
v0.1.1
v0.1.2
v0.10.0
v0.10.2
v0.10.3
v0.10.4
v0.11.0
v0.11.1
v0.11.2
v0.11.3
v0.11.4
v0.11.5
v0.12.0
v0.12.1
v0.13.0
v0.13.1
v0.13.2
v0.14.0
v0.14.1
v0.15.0
v0.16.0
v0.16.1
v0.17.0
v0.17.1
v0.17.2
v0.17.3
v0.17.4
v0.17.5
v0.17.6
v0.17.7
v0.18.0
v0.18.1
v0.18.2
v0.19.0
v0.2.0
v0.2.1
v0.2.2
v0.2.3
v0.2.4
v0.2.5
v0.20.0
v0.20.1
v0.20.2
v0.20.3
v0.20.4
v0.20.5
v0.21.0
v0.21.1
v0.21.2
v0.21.3
v0.3.0
v0.3.1
v0.3.2
v0.3.3
v0.4.0
v0.4.1
v0.4.2
v0.4.3
v0.5.0
v0.6.0
v0.6.1
v0.6.2
v0.7.0
v0.7.1
v0.7.2
v0.7.3
v0.7.4
v0.7.5
v0.8.0
v0.8.1
v0.8.2
v0.8.3
v0.9.0
v1.*
v1.0.0
v1.0.1
v2.*
v2.0.0
v2.0.1
v2.0.2
v2.0.3
v2.0.4
v2.0.5
v2.0.6
v2.1.0
v2.1.1
v2.2.0
v2.2.1
v2.2.2
v2.4.0
v2.4.1
v2.4.2
v2.5.0
v2.5.1

Database specific

source
"https://cna.erlef.org/osv/EEF-CVE-2026-81856.json"