CVE-2026-81856
Terminal escape sequence injection in Hex via unneutralized server-supplied output
Mitigation
- Upgrade hex to 2.5.2 or later.
Who should check
- Anyone running hexpm hex >= 0.0.1, < 2.5.2
- Anyone running hexpm hex >= 211303e3f68f5d3ce06450c1ff1a7a770a9ab236, < *
Vulnerability facts
- Affected
- hexpm hex >= 0.0.1, < 2.5.2; hexpm hex >= 211303e3f68f5d3ce06450c1ff1a7a770a9ab236, < *
- Fixed in
- hexpm hex 2.5.2
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 2.3 (v4.0, CNA)CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:NOpen in CVSS calculator
Show all 11 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Attack requirements: Present
- Privileges required: None
- User interaction: Passive
- Confidentiality impact: None
- Integrity impact: Low
- Availability impact: None
- Confidentiality impact on other systems: None
- Integrity impact on other systems: None
- Availability impact on other systems: None
- EPSS
- 0.73% chance of exploitation in 30 days (percentile 50, 2026-11-26)
- CWE
- CWE-150
- Modified
Description
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.
Affected and fixed versions
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-81856. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-81856.md Affected: hexpm hex >= 0.0.1, < 2.5.2; hexpm hex >= 211303e3f68f5d3ce06450c1ff1a7a770a9ab236, < * Fixed in: hexpm hex 2.5.2 Steps: 1. Search this machine and project for hexpm hex: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
Patches
FAQ
Is CVE-2026-81856 being exploited?
There is no confirmed exploitation: CVE-2026-81856 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.73% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2026-81856?
Low: CVSS 2.3 (v4.0, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.
Which versions are affected by CVE-2026-81856?
hexpm hex >= 0.0.1, < 2.5.2; hexpm hex >= 211303e3f68f5d3ce06450c1ff1a7a770a9ab236, < *.
Is there a fix for CVE-2026-81856?
Yes. Fixed in hexpm hex 2.5.2. Upgrade hex to 2.5.2 or later.
How do I check if I'm affected by CVE-2026-81856?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.