# CVE-2026-81856: Terminal escape sequence injection in Hex via unneutralized server-supplied output

- Severity: Low 2.3 (CVSS:4.0, scored by EEF) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.57%, higher than 48% of CVEs (2026-12-01)
- Published: 2026-10-12T15:46:12.146Z
- Modified: 2026-11-25T06:30:35.844Z
- Also known as: EEF-CVE-2026-81856, GHSA-fpmj-3cxg-p766
- Weaknesses: CWE-150
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: EEF

## 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.

(As written by CVE List.)

## Affected

- hex: from 0.0.1 before 2.5.2
- hexpm/hex: from 211303e3f68f5d3ce06450c1ff1a7a770a9ab236 before *
- https://github.com/hexpm/hex: from 211303e3f68f5d3ce06450c1ff1a7a770a9ab236 before 4a9a865c00add6985e04ce33e9c775df9cf8fc38; before dd3305ddf0032f6d0b468fd40dbbc3072bfcb8b8

## Every score

- EEF: CVSS:4.0 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:N`
- Erlang Ecosystem Foundation: CVSS:4.0 `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`

## References

- <https://github.com/hexpm/hex/security/advisories/GHSA-fpmj-3cxg-p766> (advisory, related, vendor-advisory)
- <https://cna.erlef.org/cves/CVE-2026-81856.html> (related, web)
- <https://osv.dev/vulnerability/EEF-CVE-2026-81856> (related)
- <https://github.com/hexpm/hex/commit/211303e3f68f5d3ce06450c1ff1a7a770a9ab236> (related, web)
- <https://github.com/hexpm/hex/commit/4a9a865c00add6985e04ce33e9c775df9cf8fc38> (fix, patch)
- <https://github.com/hexpm/hex/commit/dd3305ddf0032f6d0b468fd40dbbc3072bfcb8b8> (fix, patch)

## Sources

- CVE List: [CVE-2026-81856](https://www.cve.org/CVERecord?id=CVE-2026-81856), CVE Terms of Use, modified 2026-11-20
- Erlang Ecosystem Foundation: [EEF-CVE-2026-81856](https://osv.dev/vulnerability/EEF-CVE-2026-81856), CC-BY-4.0, modified 2026-11-25
- NVD: [CVE-2026-81856](https://nvd.nist.gov/vuln/detail/CVE-2026-81856), Public domain, modified 2026-11-20

---

Page: https://cve.day/CVE-2026-81856 · Whole record: https://cve.day/CVE-2026-81856.json · Rebuilt by cve.day 2026-11-25T22:59:43.600Z
