Bug 2549713 (CVE-2026-81856)

Summary: CVE-2026-81856 hex: hex: Terminal output spoofing via unescaped control sequences
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: abarbaro, akhatavk, alizardo, anpicker, anthomas, aos-team-art-private, aprice, asdas, bbrownin, blitton, brasmith, cochase, dbosanac, doconnor, dpaolell, dranck, dschmidt, eborisov, eglynn, ehelms, gbenhaim, ggainey, gotiwari, hasun, hoberger, ikhan, jcantril, jchui, jdelft, jfula, jhe, jhorak, jjoyce, jlanda, jowilson, jpasqual, jpretori, jreimann, jsamir, jschluet, jupierce, juwatts, kshier, ktsao, lball, lgarciaa, lhh, lpele, mbarnett, mbiarnes, mburns, mdellweg, mdessi, mgarciac, mhulan, mrizzi, mvyas, nboldt, ngough, niyer, nmoumoul, nyancey, oaljalju, oezr, ometelka, osousa, pcattana, pcreech, ppalepu, ppostler, prdhamdh, psrna, ptisnovs, rbobbitt, rchan, rekumar, rhel-process-autobot, rojacob, sarad, sghai, sidsharm, simaishi, smallamp, sprizend, stcannon, suppawar, syedriko, tmalecek, twaugh, veshanka, vlaad, vvoronko, watson-tool-maintainers, xdharmai, yguenane
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
A flaw was found in hex. A remote attacker can inject unescaped terminal control sequences into the output of package manager commands by publishing a package with crafted metadata or serving hostile repository responses. When a user inspects package details, searches for packages, or views error messages, these raw control sequences are rendered directly by the terminal. This flaw can allow attackers to spoof displayed commands and URLs, obscure terminal output, or alter clipboard contents.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2559044, 2559045    
Bug Blocks:    

Description OSIDB Bzimport 2026-10-12 16:01:39 UTC
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.