cve.bz

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

2.3 lowEPSS 0.4%

Low (2.3) in hexpm hex. EPSS 0.4% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

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
EPSS
0.4% (unchanged from 0.4% a week ago; 0.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 38th percentile. Scored 2026-11-17. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2026-10-16. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-150 Improper Neutralization of Escape, Meta, or Control Sequences
Published
Modified
Assigned by
EEF (CNA)
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-81856 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-81856?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-81856?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-81856 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
hexpm hexfrom 0.0.1 before 2.5.2

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian13erlang-hexno fix listedDEBIAN-CVE-2026-81856
Debian14erlang-hex2.5.3-2DEBIAN-CVE-2026-81856
Ubuntu24.04:LTS, 26.04:LTS, 26.10erlang-hexno fix listedUBUNTU-CVE-2026-81856

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

This vulnerability is assessed with a Moderate impact because exploitation depends on interactive user queries against untrusted package registries and cannot automatically achieve remote code execution without further developer action. In Red Hat environments, Hex is utilized during development and build processes rather than running as an exposed background daemon. While maliciously formatted metadata or error messages can visually deceive developers or manipulate the clipboard in certain terminal emulators, the issue remains restricted to the local command-line session processing third-party packages.

ProductPackageStateAdvisory
Ansible Automation Orchestrator 2026ansible-automation-platform/automation-orchestrator-backend-rhel9Fix deferred
Confidential Cluster Operatorconfidential-clusters-beta/attestation-key-register-rhel9Fix deferred
Confidential Cluster Operatorconfidential-clusters-beta/compute-pcrs-rhel9Fix deferred
Confidential Cluster Operatorconfidential-clusters-beta/confidential-cluster-operator-bundleFix deferred
Confidential Cluster Operatorconfidential-clusters-beta/confidential-cluster-rhel9-operatorFix deferred
Confidential Cluster Operatorconfidential-clusters-beta/registration-server-rhel9Fix deferred
Confidential Compute Attestationagent-sandbox/agent-sandbox-routerFix deferred
Confidential Compute Attestationbuild-of-trustee/trustee-rhel9Fix deferred
Confidential Compute Attestationopenshift-sandboxed-containers/osc-podvm-builder-rhel9Fix deferred
Confidential Compute Attestationopenshift-sandboxed-containers/osc-podvm-payload-rhel9Fix deferred
Lightspeed Services for Advanced Cluster Managementlightspeed-services-acm/ocp-rules-rhel9Fix deferred
Logging Subsystem for Red Hat OpenShiftopenshift-logging/vector-rhel9Fix deferred
OpenShift Lightspeedopenshift-lightspeed/lightspeed-ocp-rag-rhel9Fix deferred
OpenShift Lightspeedopenshift-lightspeed/lightspeed-to-dataverse-exporter-rhel9Fix deferred
Pen Drive Powered by Red Hat Lightspeedpen-drive/pen-drive-scanner-rhel9Fix deferred
Red Hat Ansible Automation Platform 2ansible-automation-platform-24/lightspeed-rhel8Fix deferred
Red Hat Ansible Automation Platform 2ansible-automation-platform-25/lightspeed-chatbot-rhel8Fix deferred
Red Hat Ansible Automation Platform 2ansible-automation-platform-25/lightspeed-rhel8Fix deferred
Red Hat Ansible Automation Platform 2ansible-automation-platform-26/controller-rhel9Fix deferred
Red Hat Ansible Automation Platform 2ansible-automation-platform-26/de-minimal-rhel9Fix deferred
113 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-81856.

Attack patterns (CAPEC)

  • CAPEC-41 Using Meta-characters in E-mail Headers to Inject Malicious Payloads Likelihood: High · Severity: High
  • CAPEC-81 Web Server Logs Tampering Likelihood: Medium · Severity: High
  • CAPEC-93 Log Injection-Tampering-Forging Likelihood: High · Severity: High
  • CAPEC-134 Email Injection Severity: Medium

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON