CVE-2026-81856
CVE-2026-81856 — Terminal escape sequence injection in Hex via unneutralized server-supplied output
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.
Published Updated Sources: NVD, hexpm (CNA), GitHub, Red Hat (VEX), SOCRadar CTI
Triage
Is it exploited, how likely is exploitation, what does it touch, and how severe do the scoring sources call it.
Exploitation
Exploit code
public exploit, none observed
EPSS
0%
ahead of 0% of scored CVEs
CVSS base
2.3
low · 2 sources
Remediation
The vendor's own words where we have them.
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.
Red Hat VEX · CVE-2026-81856
First 24 hours
Ordered from the record's own fields — exposure first, because you cannot patch what you have not found.
- Identify exposed assets running affected vendor/product/version combinations.
- Prioritize based on EPSS, PoC availability, and external exposure.
- Search available logs for exploit probes, errors, authentication anomalies, or suspicious child processes matching the vulnerability class.
Affected scope
Vendor, product and version as the advisories word them.
| Vendor | Product | Versions | Status |
|---|---|---|---|
| hexpm | hex | 0.0.1 to < 2.5.2 | Vulnerable |
| hexpm | hex | 211303e3f68f5d3ce06450c1ff1a7a770a9ab236 | Vulnerable |
Attack characteristics
The CVSS vector, decoded. It describes the attack, not your exposure to it.
Scope
X
Attack Complexity
Low
Attack Vector
Network
Privileges Req
None
User Interaction
P
Every base score collected
Sources score independently and disagree; each row says who scored it and under which version.
| Score | Version | Severity | Expl. | Impact | Source |
|---|---|---|---|---|---|
| 2.3 | CVSS 4.0 | low | — | — | hexpm (CNA) |
| 4.3 | CVSS 3.1 | medium | — | — | Red Hat (VEX) |
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
What this weakness leads to
MITRE's own consequences and mitigations for the weakness class — the authority's wording, not guidance derived from the CVSS vector.
CWE-150 · Improper Neutralization of Escape, Meta, or Control Sequences
- Unexpected State::
Mitigation: Developers should anticipate that escape, meta and control characters/sequences will be injected/removed/manipulated in the input vectors of their software system. Use an appropriate combination of denylists and allowlists to ensure only valid, expected and appropriate input is processed by the system.
Weakness & attack patterns
- CWE-150
Attack patterns reported against this CVE. The ATT&CK techniques below are inferred from its weakness class.
Public exploit
Capability, not use: code existing is a different claim from anyone running it.
Repositories
1
Detection
Read off the CVSS vector and the weakness class. Starting points, not rules we have tested.
- Search application, proxy, and WAF logs for requests touching /1.
- Prioritize edge telemetry for network-reachable hex.
- Monitor for scanner or exploit-pattern traffic after 1 public PoC repositories were reported.
Timeline
What happened to this CVE, newest first — with the readings a source repeats on a schedule counted underneath rather than listed.
- 2026
Added · CVSS 3.1 2.3 (AV:N)
Oct 12, 2026 · NVD
Initial · CVE published
Oct 12, 2026 · NVD
CVE published by MITRE.
Oct 12, 2026 · SOCRadar CTI
References
7 on the record
- cna.erlef.org/cves/CVE-2026-81856.html
Vendor Advisory, Mitre, NIST
- github.com/hexpm/hex/commit/211303e3f68f5d3ce06450c1ff1a7a770a9ab236
Exploit, Third Party Advisory, Mitre, NIST
- github.com/hexpm/hex/commit/dd3305ddf0032f6d0b468fd40dbbc3072bfcb8b8
Exploit, Third Party Advisory, Mitre, NIST
- github.com/hexpm/hex/security/advisories/GHSA-fpmj-3cxg-p766
Exploit, Third Party Advisory, Mitre, NIST
- osv.dev/vulnerability/EEF-CVE-2026-81856
Vendor Advisory, Mitre, NIST
- access.redhat.com/security/cve/CVE-2026-81856
Vendor Advisory
- www.cve.org/CVERecord?id=CVE-2026-81856
Vendor Advisory
Elsewhere on this site
- hexpmevery CVE for this vendor
- Unclassifiedsame class
- CWE-150other pages naming this weakness
Not in any source we poll
Listed rather than left blank: an empty field and an unmeasured one look identical on screen, and only one is a reason to look elsewhere.
- No confirmed IOCs, IP addresses, domains, file hashes, or malware artifacts supplied.
- No organization-specific asset inventory, compensating-control status, or patch deployment evidence supplied.
- No exploit packet captures, log samples, or incident case IDs supplied.
Answered from this record1
What should defenders know first?
CVE-2026-81856 is Terminal escape sequence injection in Hex via unneutralized server-supplied output, a low vulnerability affecting hex from hexpm. The current evidence does not list it in CISA KEV, and the exploit status is: Active exploitation is not confirmed from current sources for CVE-2026-81856. Public exploit evidence is: 1 public PoC repositories reported; 0 marked weaponized in current dataset. The affected-version evidence is listed in the key facts and affected products tables. Defenders should first verify whether exposed or business-critical assets run those versions, then apply vendor patches or mitigations, restrict reachable attack surface, and preserve logs for detection review. CVSS 2.3 describes technical severity, while EPSS 0% helps estimate near-term exploit likelihood; neither replaces asset context. Unknown fields should remain explicit in tickets, and threat actor, IOC, victimology, or payload claims should not be added unless a cited source supports them. Monitor CISA KEV, vendor advisories, NVD changes, public PoC repositories, and internal telemetry for update triggers.