Terminal escape sequence injection in Hex via unneutralized server-supplied output
CVE-2026-81856Published 12 Oct 2026, 15:46 UTC
Real-world risk
0.8/ 10Low
Routine
If the vulnerable configuration applies to you: 1.8
PreliminaryFrom the CVSS vector only · confidence low
CVSS
2.3
scored by the vendor (CNA), CVSS 4.0
In plain words
No plain-language summary yet. The original description is below.
Original description (from EEF)
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.
Am I affected?
| Product | Affected versions (from the sources) | Fixed in |
|---|---|---|
| hexNiche | >= 0.0.1, < 2.5.2 | 2.5.2 |
What to do
Update to a fixed version: 2.5.2.
Why this score
| Factor | Value | Evidence | × |
|---|---|---|---|
| Impact | MinorReflected XSS, CSRF with low effect, open redirect, minor leak | From the CVSS vector | 0.30 |
| Attacker position | InternetAnyone on the Internet can reach a typical deployment | From the CVSS vector | 1.00 |
| Privileges needed | NoneNo account | From the CVSS vector | 1.00 |
| Victim interaction | RoutineA normal action: open a file, visit a page, click a link | From the CVSS vector | 0.70 |
| Configuration | UncommonNeeds a non-default feature that a minority enables | From the CVSS vector | 0.45 |
| Reliability | ReliableDeterministic: injection, logic bug, path traversal | From the CVSS vector | 1.00 |
Threat level T1: Nothing known (× 0.85)
The default for a new disclosure
EPSS 0.6% chance of exploitation in 30 days (percentile 49), as of 2026-12-03.
The arithmetic
- Prerequisites multiplied together0.315
- Threat T1: Nothing known0.850
- 10 × impact 0.3 × prerequisites 0.315 × threat 0.850.803
- Rounded to one decimal between 0.1 and 100.8
Exploitation and evidence timeline
- 12 Oct 2026 Published
- 3 Dec 2026 Risk 0.8 (cvss fallback)
Weakness
CWE-150
References
- https://github.com/hexpm/hex/security/advisories/GHSA-fpmj-3cxg-p766related, vendor-advisory
- https://cna.erlef.org/cves/CVE-2026-81856.htmlrelated
- https://osv.dev/vulnerability/EEF-CVE-2026-81856related
- https://github.com/hexpm/hex/commit/211303e3f68f5d3ce06450c1ff1a7a770a9ab236related
- https://github.com/hexpm/hex/commit/4a9a865c00add6985e04ce33e9c775df9cf8fc38patch
- https://github.com/hexpm/hex/commit/dd3305ddf0032f6d0b468fd40dbbc3072bfcb8b8patch
- CVE-2026-81856 on CVE.org