Skip to content
Heist/ feed
Back to feed
Low

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

Type: advisorySources: OSV

## 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. ## Impact A malicious package publisher can forge what a developer sees when running `mix hex.search`, rewriting the displayed hexdocs URL or a suggested command, concealing real output, or writing attacker-chosen text to t

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-81856
Confirmed fixed CVEs
Not specified
Updated in this feed
30 Oct 2026, 06:38 UTC · Revision 1

Source evidence

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

core-osv · Original source

Published 12 Oct 2026, 15:46 UTC

## 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. ## Impact A malicious package publisher can forge what a developer sees when running `mix hex.search`, rewriting the displayed hexdocs URL or a suggested command, concealing real output, or writing attacker-chosen text to t

osv:EEF-CVE-2026-81856
Complete source record
{
  "id": "4c4bb6c8c1845d9cfb8e4f686027c99796ec48ec99a9bfac67f9ef122aea49f9",
  "url": "https://osv.dev/vulnerability/EEF-CVE-2026-81856",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Terminal escape sequence injection in Hex via unneutralized server-supplied output",
    "summary": "## 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. ## Impact A malicious package publisher can forge what a developer sees when running `mix hex.search`, rewriting the displayed hexdocs URL or a suggested command, concealing real output, or writing attacker-chosen text to t",
    "evidence": "osv:EEF-CVE-2026-81856",
    "products": [],
    "severity": "low",
    "structured": {
      "id": "EEF-CVE-2026-81856",
      "aliases": [
        "CVE-2026-81856",
        "EEF-CVE-2026-81856",
        "GHSA-fpmj-3cxg-p766"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "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"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/hexpm/hex",
              "type": "GIT",
              "events": [
                {
                  "introduced": "211303e3f68f5d3ce06450c1ff1a7a770a9ab236"
                },
                {
                  "fixed": "dd3305ddf0032f6d0b468fd40dbbc3072bfcb8b8"
                }
              ]
            }
          ],
          "versions": [
            "v2.5.1",
            "v2.5.0",
            "v2.2.2",
            "v2.4.2",
            "v2.4.1",
            "v2.4.0",
            "v2.2.1",
            "v2.2.0",
            "v2.0.6",
            "v2.1.1",
            "v0.21.3",
            "v2.1.0",
            "v2.0.5",
            "v2.0.4",
            "v2.0.3",
            "v2.0.2",
            "v2.0.1",
            "v2.0.0",
            "v1.0.1",
            "v1.0.0",
            "v0.21.2",
            "v0.21.1",
            "v0.21.0",
            "v0.20.5",
            "v0.20.4",
            "v0.20.3",
            "v0.20.2",
            "v0.18.2",
            "v0.19.0",
            "v0.16.1",
            "v0.20.1",
            "v0.20.0",
            "v0.18.1",
            "v0.18.0",
            "v0.17.7",
            "v0.17.6",
            "v0.17.5",
            "v0.17.4",
            "v0.17.3",
            "v0.17.2",
            "v0.17.1",
            "v0.17.0",
            "v0.16.0",
            "v0.15.0",
            "v0.14.1",
            "v0.14.0",
            "v0.13.2",
            "v0.13.1",
            "v0.13.0",
            "v0.12.1",
            "v0.12.0",
            "v0.11.5",
            "v0.11.4",
            "v0.11.3",
            "v0.11.2",
            "v0.11.1",
            "v0.11.0",
            "v0.10.4",
            "v0.10.3",
            "v0.10.2",
            "v0.10.0",
            "v0.9.0",
            "v0.8.3",
            "v0.8.2",
            "v0.8.1",
            "v0.8.0",
            "v0.7.5",
            "v0.7.4",
            "v0.7.3",
            "v0.7.2",
            "v0.7.1",
            "v0.7.0",
            "v0.6.2",
            "v0.6.1",
            "v0.6.0",
            "v0.5.0",
            "v0.4.3",
            "v0.4.2",
            "v0.4.1",
            "v0.4.0",
            "v0.3.3",
            "v0.3.2",
            "v0.3.1",
            "v0.3.0",
            "v0.2.5",
            "v0.2.4",
            "v0.2.3",
            "v0.2.2",
            "v0.2.1",
            "v0.2.0",
            "v0.1.2",
            "v0.1.1",
            "v0.1.0",
            "v0.0.1"
          ],
          "database_specific": {
            "source": "https://cna.erlef.org/osv/EEF-CVE-2026-81856.json"
          }
        }
      ],
      "modified": "2026-10-12T16:11:11.667317121Z",
      "provider": "osv",
      "references": [
        "https://github.com/hexpm/hex/security/advisories/GHSA-fpmj-3cxg-p766",
        "https://cna.erlef.org/cves/CVE-2026-81856.html",
        "https://github.com/hexpm/hex/commit/211303e3f68f5d3ce06450c1ff1a7a770a9ab236",
        "https://github.com/hexpm/hex/commit/dd3305ddf0032f6d0b468fd40dbbc3072bfcb8b8"
      ],
      "provider_metadata": {
        "cpe_ids": [
          "cpe:2.3:a:hexpm:hex:*:*:*:*:*:*:*:*"
        ],
        "cwe_ids": [
          "CWE-150"
        ],
        "capec_ids": [
          "CAPEC-93"
        ]
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-81856",
        "evidence": "/aliases"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 300021,
  "published_at": "2026-10-12T15:46:12.146+00:00"
}