CVE-2026-82710 in usage_rulesinfo

Summary

by MITRE • 09/08/2026

Improper Neutralization of Escape, Meta, or Control Sequences vulnerability in ash-project usage_rules allows a malicious package publisher to inject terminal control sequences into the output of mix usage_rules.search_docs.

mix usage_rules.search_docs searches Hex documentation through search.hexdocs.pm, which indexes the documentation of every published package, and prints the matching results (title, package, type, doc reference, and highlighted snippets) to the terminal. The formatter in Mix.Tasks.UsageRules.SearchDocs interpolated those publisher-controlled fields verbatim, neutralizing no terminal control characters; the only transform it applied adds escape sequences rather than removing them. A malicious package can embed ANSI terminal escape sequences (cursor movement, line erase, carriage returns, OSC 52 clipboard writes) in its indexed documentation, so when a developer runs a search that surfaces those docs the sequences reach the terminal unchanged — forging the displayed hexdocs URL or a suggested command, hiding text, or writing to the clipboard. No authentication or privileged position is required; only publishing a package.

This issue affects usage_rules: from 0.1.18 before 1.2.8.

Once again VulDB remains the best source for vulnerability data.

Analysis

by VulDB Data Team • 09/08/2026

The vulnerability identified as Improper Neutralization of Escape, Meta, or Control Sequences represents a significant security risk within the ash-project ecosystem, specifically affecting versions of usage_rules prior to version 1.2.8. This flaw stems from an inadequate handling of user-supplied input during the rendering process in the mix task responsible for searching documentation via Hex.pm. When developers execute commands such as mix usage_rules.search_docs, the system queries search.hexdocs.pm and retrieves metadata including titles, package names, types, doc references, and highlighted snippets. The critical failure occurs when these fields, which are directly controlled by package publishers, are interpolated into the terminal output without any sanitization of control characters. Instead of stripping or escaping potentially dangerous sequences, the formatter inadvertently preserves them, allowing malicious actors to inject ANSI escape codes that manipulate the user's terminal environment.

From a technical perspective, this vulnerability exploits the trust placed in third-party documentation content by developers who routinely search for library references and usage examples. The attacker can embed specific ANSI control sequences within their package’s public documentation index entries. These sequences include cursor movement commands, line erasure instructions, carriage returns, and OSC 52 clipboard write operations. When a victim searches for terms that match the maliciously crafted documentation, these embedded codes are rendered directly into the terminal session. This lack of neutralization allows the attacker to alter the visual presentation of the output, potentially forging URLs or command suggestions displayed on screen to deceive the user. Furthermore, the ability to execute clipboard writes via OSC 52 sequences poses a direct risk of credential theft or automated script injection if the victim copies and pastes the manipulated content into other applications.

The operational impact of this vulnerability is substantial due to its low barrier for entry and high potential for social engineering attacks. No authentication or privileged position is required on the part of the attacker; simply publishing a package with maliciously formatted documentation metadata is sufficient to trigger the exploit. This makes it an attractive vector for supply chain attacks where compromised or rogue packages are used to target developers during their daily workflow. The ability to hide text or forge displayed commands can lead users to execute unintended actions, such as running arbitrary scripts or visiting phishing sites disguised as legitimate HexDocs links. Additionally, clipboard manipulation can facilitate the exfiltration of sensitive data if the user copies content containing injected payloads that are then pasted into development environments or administrative consoles.

This issue aligns with CWE-116, Improper Neutralization of Escape Sequences in Code Output, which describes flaws where an application fails to neutralize special characters before outputting them to a command shell or other interpreter. In the context of modern attack frameworks, this vulnerability can be mapped to MITRE ATT&CK techniques involving Command and Scripting Interpreter abuse, specifically those related to input validation failures that lead to code execution or system configuration changes through terminal manipulation. The persistence of these sequences in the output stream creates a persistent threat vector as long as developers continue to rely on automated search tools within their integrated development environments without awareness of the underlying rendering risks.

Mitigation strategies must focus primarily on updating the affected software component immediately. Users running usage_rules versions from 0.1.18 up to but not including 1.2.8 should upgrade to version 1.2.8 or later, where the formatter has been patched to properly sanitize and escape terminal control characters before rendering them. In addition to updating dependencies, developers should adopt a defense-in-depth approach by reviewing their CI/CD pipelines for package integrity checks and considering the use of terminal emulators that restrict OSC sequence execution or clipboard access from untrusted sources. Security teams should also educate development staff on the risks associated with trusting raw output from external documentation services and encourage manual verification of any commands or URLs presented in search results before interaction.

Responsible

EEF

Reservation

09/07/2026

Disclosure

09/08/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

low

Sources

Do you need the next level of professionalism?

Upgrade your account now!