Skip to main content

ansi2html CVE-2026-92973

| EUVDEUVD-2026-81582 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-09-17 VulnCheck GHSA-98hw-5x94-6hwv
5.3
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft OSC 8 hyperlink with javascript: or quote breakout
  2. Delivery
    Deliver ANSI text into app's input
  3. Exploit
    ansi2html emits unescaped href
  4. Execution
    Victim views/clicks rendered link
  5. Persist
    Script executes in page origin
  6. Impact
    Session/data theft in browser context

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires a downstream application that (1) passes attacker-controlled ANSI text through ansi2html versions 1.7.0a0-1.9.3, (2) renders the converted HTML output in a browser without additional output sanitization, and (3) has a victim view (UI:P) that page. The specific trigger is an OSC 8 hyperlink sequence (ESC ]8;; ... BEL) whose URL target is either a javascript:-style scheme or contains a double-quote character to terminate the href attribute - neither validated nor escaped before this patch. Limiting factors: no direct impact from the library in isolation (it must be embedded in a web-rendering pipeline), passive user interaction is needed, and applications that already HTML-sanitize converter output downstream are not exploitable.

Impact

This is a moderate-severity, real-but-not-urgent web vulnerability. The vendor CVSS 4.0 base score is 5.3 (AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N), reflecting a network-reachable, low-complexity XSS whose impact is limited (low confidentiality/integrity on both the vulnerable and subsequent system) and gated by passive user interaction (UI:P - a victim must view the rendered page). No EPSS score, no CISA KEV listing, and no explicit public exploit are present in the input, so exploitation status is 'no public exploit identified at time of analysis' - though the fix commit's test cases (test_osc_link_scheme, test_osc_link_quote_escaped/unescaped) effectively document the exact injection technique. The signals are internally consistent: this is a library-level XSS that only becomes exploitable when a downstream application feeds attacker-controlled ANSI text through ansi2html and renders the result in a browser, so real-world risk is entirely dependent on the consuming application's context and trust boundary. It is a legitimate issue to patch, but it is a low-real-risk item relative to critical RCE-class CVEs - no evidence of active or automated exploitation. The commit diff independently confirms both the root cause (unvalidated/unescaped OSC 8 href targets) and the remediation (scheme allowlist plus quote escaping).

Exploit ScenarioDerived

An application uses ansi2html to render attacker-influenced terminal output (e.g., CI/build logs, chat or log-viewer output, or command results) as HTML in a web page. The attacker embeds an OSC 8 hyperlink whose URL uses a javascript: scheme or contains a double-quote to break out of the href attribute; when a victim views the rendered page and interacts with the link, the injected script executes in the page's origin. No public exploit is identified, but the vendor's patch tests demonstrate the exact payload structure.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 17, 2026

Cross-site scripting in ansi2html 1.7.0a0 through 1.9.3 allows an attacker who controls ANSI text input to inject javascript: URL targets or to terminate the generated href attribute inside OSC 8 hyperlink sequences, causing arbitrary script execution in the browser context of any page that displays the converted HTML. Exploitation is indirect: the library itself must be embedded in a downstream rendering pipeline that converts attacker-supplied terminal output and serves the result to a victim without further output sanitization, and the payload only fires with user interaction on that page (UI:P / UI:R). This is a moderate-severity, real-but-not-urgent web vulnerability; unauthenticated remote attackers can supply the malicious ANSI text, no public exploit identified at time of analysis, no CISA KEV listing, and an upstream fix commit is available though a tagged patched release was not independently confirmed from the supplied data.

RemediationAI

Upstream fix available (PR/commit); released patched version not independently confirmed - apply the vendor fix commit 89d1c231c60ac52005f3b21bbba551c786c554fc (https://github.com/pycontribs/ansi2html/commit/89d1c231c60ac52005f3b21bbba551c786c554fc) by upgrading to any release, tag or package build that contains it, and verify behaviour with the OSC 8 regression tests it adds (unknown schemes rewritten to "#", embedded quotes emitted as "). Where an update cannot be shipped immediately, the most targeted compensating control is to sanitize the converter output downstream before it reaches the browser: run the HTML through an allowlist sanitizer that strips javascript:/data:/vbscript: URIs and disallows event-handler attributes, which is cheap and preserves legitimate formatting at the cost of an extra processing step, though it must be applied to every rendering path (applications that already sanitize converter output downstream are not exploitable). Alternatively, pre-process untrusted ANSI input to drop or rewrite OSC 8 sequences whose target is not an http/https URL before conversion, accepting the loss of legitimate mailto: and terminal-hyperlink functionality. Serving converted output under a restrictive Content-Security-Policy with a script-src that does not permit 'unsafe-inline' and does not allow javascript: navigation blunts the javascript:-scheme variant but does not reliably stop attribute-breakout markup, so CSP should be treated as defense in depth rather than the fix; disabling OSC 8 hyperlink generation entirely in the converter is the most robust fallback, with the trade-off that hyperlinks embedded in terminal output are rendered as plain text. Also review the consuming application's trust boundary, since no impact arises from the library in isolation: the exploit chain requires an unauthenticated attacker to feed ANSI text into a pipeline that converts it and a victim to view the resulting page (UI:P).

Affected VersionsENISA

ansi2html 1.7.0a0 <1.9.4

Affected Packages

euvd ansi2html fix: 1.9.4

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

ansi2html is a Python library (pycontribs/ansi2html) that converts ANSI/ECMA-48 terminal escape sequences into HTML so that coloured, styled terminal output can be embedded in web pages, logs viewers, CI dashboards and chat/notification front-ends. The vulnerable feature is OSC 8 (Operating System Command 8), the widely supported sequence of the form ESC ] 8 ; ; <URL> BEL <link text> ESC ] 8 ; ; BEL used by modern terminals to render clickable hyperlinks; the converter's handle_osc_links function (src/ansi2html/converter.py, around lines 345-349 in v1.9.3) passed the URL directly into an anchor element as href="..." with neither scheme validation nor attribute escaping. That produces two distinct CWE-79 (Improper Neutralization of Input During Web Page Generation) failure modes from the same code path: a javascript:-style or otherwise hostile scheme reaches the href unchanged, and a URL containing a double-quote character closes the href attribute early so that attacker-controlled text becomes new attributes or markup. The upstream fix commit 89d1c231c60ac52005f3b21bbba551c786c554fc adds a broad URL-scheme matcher (https?, ftps?, gopher, telnet, nntp, mailto:, news:) that rewrites any non-matching target to "#", and replaces embedded double quotes with &quot;, with regression tests covering unknown schemes and quoted URLs for both escaped and unescaped converter modes. The supplied CVSS:4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N) indicates an unauthenticated network-reachable flaw with passive user interaction and low confidentiality/integrity impact on both the vulnerable and subsequent systems, consistent with the independent CVSS:3.1 assessment AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N; there is no availability impact and the CPE cpe:2.3:a:pycontribs:ansi2html:*:*:*:*:*:*:*:* is version-wildcarded and therefore does not by itself distinguish patched from unpatched builds.

Know when Ansi2Html gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 5.3 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N
vuln.today AI 6.1 MEDIUM

Network-reachable, low-complexity XSS requiring victim interaction (UI:R) and executing across a trust boundary into the browser (S:C) with limited confidentiality/integrity and no availability impact.

3.1 AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N
SUSE 6.1 MEDIUM
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Red Hat 6.1 MEDIUM

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
None
Subsequent system: Confidentiality
Low
Subsequent system: Integrity
Low
Subsequent system: Availability
None

DescriptionCVE.org

ansi2html versions 1.7.0a0 through 1.9.3 contain a cross-site scripting vulnerability in OSC 8 hyperlink handling that fails to validate or escape URL targets. Attackers controlling ANSI text input can inject javascript: schemes or terminate href attributes to execute arbitrary scripts in the context of pages displaying converted output.

Threat Intelligence Overview

EPSS Score
0.2%
Top 87% exploitable
Prevalence
Medium
widely-used Python library for converting terminal/ANSI output to HTML
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
openSUSE Tumbleweed Fixed
SUSE Linux Enterprise Module for Package Hub 15 SP7 Not-Affected
SUSE Linux Enterprise Module for Package Hub 15 SP5 Not-Affected
SUSE Linux Enterprise Module for Package Hub 15 SP6 Not-Affected
openSUSE Leap 15.5 Not-Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy