CVE-2026-81856hexpm hex Improper Neutralization of Escape, Meta, or Control Sequences
NVD
Vulnerability 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.
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.
CVSS v4.0 Base Metrics — Score 2.3 (LOW)
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:NAttack VectorNetwork
Attack ComplexityLow
Attack RequirementsPresent
Privileges RequiredNone
User InteractionPassive
Confidentiality (Vulnerable System)None
Integrity (Vulnerable System)Low
Availability (Vulnerable System)None
Confidentiality (Subsequent System)None
Integrity (Subsequent System)None
Availability (Subsequent System)None
Affected & Patched Versions
- hexpm hex >= 0.0.1 and < 2.5.2
- hexpm hex >= 211303e3f68f5d3ce06450c1ff1a7a770a9ab236 and < *
- hexpm hex 2.5.2
- hexpm hex *
What to do
Fix it during your normal patch cycle. No exploitation is confirmed yet.
- Check whether you run hexpm hex and which version.
- Update to a patched version listed above, then confirm the new version.
Timeline
- Oct 12, 2026Published
- Nov 20, 2026Record last modified
Score, severity and exploitation changes are tracked from the day Watchtower started logging them.
Get notified about new hexpm hex CVEsYou are reading CVE-2026-81856. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alertsExternal References
- Vendor Advisoryhttps://github.com/hexpm/hex/security/advisories/GHSA-fpmj-3cxg-p766
- Referencehttps://cna.erlef.org/cves/CVE-2026-81856.html
- Referencehttps://osv.dev/vulnerability/EEF-CVE-2026-81856
- Patchhttps://github.com/hexpm/hex/commit/211303e3f68f5d3ce06450c1ff1a7a770a9ab236
- Patchhttps://github.com/hexpm/hex/commit/4a9a865c00add6985e04ce33e9c775df9cf8fc38
- Patchhttps://github.com/hexpm/hex/commit/dd3305ddf0032f6d0b468fd40dbbc3072bfcb8b8
Data last checked: Nov 24, 2026 14:13 UTC