# CVE-2026-81856: Hex terminal escape sequence injection via package metadata

Source: https://junglewise.ai/threats/cve-2026-81856-improper-neutralization-of-escape-meta-or-control-sequences  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-12. Updated: 2026-10-16  
License: CC BY 4.0 with a link back

CVE-2026-81856 · Severity: info · Published 2026-10-12

Hex is a package manager for the Elixir programming language that retrieves and displays package information to developers. A malicious package publisher can inject terminal control sequences into package metadata, allowing them to forge displayed URLs, hide real output, or write to the user's clipboard without any special privileges—just by publishing a package. Developers who search for or install packages are affected when the malicious package's metadata is displayed.

Technologies: [Hexpm Hex](https://junglewise.ai/threats/technologies/hexpm-hex). Vendors: [Hexpm](https://junglewise.ai/threats/vendors/hexpm).

## Quick answers

**Is CVE-2026-81856 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-81856 being exploited in the wild.

**How severe is CVE-2026-81856?** Informational severity, published 12 October 2026.

**Which products and versions are affected?** Hexpm Hex from 0.0.1 before 2.5.2.

**Is there a fix for CVE-2026-81856?** Yes: fixed in Hex 2.5.2. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-81856 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-81856?** Check whether you run Hexpm Hex at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- Fixed in Hex 2.5.2

## Technical details

A CWE-150 improper neutralization vulnerability allows injection of ANSI escape sequences and Unicode bidirectional overrides through unescaped package repository and search service output in multiple Mix tasks. Hex.Shell.info/1 and Hex.Shell.error/1 print server-supplied strings directly to the terminal without sanitization, affecting metadata, URLs, and API error bodies. An unauthenticated attacker can publish a malicious package with embedded escape sequences in any indexed field to forge displayed content or execute clipboard writes via OSC 52 when a developer runs affected Mix tasks.

## Affected products

- hexpm Hex from 0.0.1 before 2.5.2

## Timeline

- 2026-10-12: disclosed

## References

- [https://github.com/](https://github.com/)
- [https://cna.erlef.org/cves/CVE-2026-81856.html](https://cna.erlef.org/cves/CVE-2026-81856.html)

## Related threats

- [Erlang OTP erl_tar infinite loop in GNU sparse member handling](https://junglewise.ai/threats/cve-2026-96596-loop-with-unreachable-exit-condition-infinite-loop-vulnerability)
- [hexpm hex_core memory exhaustion via compressed data amplification](https://junglewise.ai/threats/cve-2026-105274-improper-handling-of-highly-compressed-data-data-amplification)
- [Hex package manager data amplification via compressed responses](https://junglewise.ai/threats/cve-2026-96618-improper-handling-of-highly-compressed-data-data-amplification)
- [Hex path traversal in unvalidated dependency app names](https://junglewise.ai/threats/cve-2026-96612-improper-limitation-of-a-pathname-to-a-restricted-directory-path)
- [Hex release-age cooldown bypass via package retirement](https://junglewise.ai/threats/cve-2026-105668-protection-mechanism-failure-vulnerability-in-hexpm-hex-allows)
