CVE-2026-92973

ansi2html 1.7.0a0 through 1.9.3 Cross-Site Scripting via OSC 8

Published Sep 17, 2026 CVSS 4.0 · 5.3 Medium EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

ansi2html 1.7.0a0 through 1.9.3 convert ANSI escape sequences into HTML. The OSC 8 hyperlink feature embeds URL metadata in the text, but the implementation in these versions does not validate or escape the URL target. An attacker who can control the ANSI stream can inject a malicious href that uses a javascript: scheme or breaks out of the attribute, causing arbitrary scripts to run when the converted HTML is displayed in a browser. This enables attackers to steal session data, hijack accounts, or perform other malicious actions in the victim’s browser context.

Affected Systems

The vulnerability affects the pycontribs ansi2html project. Users running ansi2html versions 1.7.0a0 through 1.9.3 are impacted. No other version ranges are listed as affected.

Risk and Exploitability

The CVSS base score is 5.3, indicating moderate severity. EPSS is not available, and the issue is not listed in CISA KEV, so no evidence of widespread exploitation is currently known. The likely attack vector requires an attacker to supply or influence ANSI text that the application converts; when the resulting HTML is rendered by a browser, the injected script executes with the user’s browser privileges.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Disable OSC 8 hyperlink parsing or sanitize the output to escape or remove javascript: schemes and other unsafe URLs.
  • Ensure that any ANSI input processed by ansi2html originates from trusted sources or is pre‑validated to prevent injection of malicious escape sequences.
  • Check for an updated version of ansi2html from the vendor or the community that addresses the OSC 8 handling issue, and apply it when available.

Generated by OpenCVE AI on September 17, 2026 at 21:19 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Pycontribs
Pycontribs ansi2html
Vendors & Products Pycontribs
Pycontribs ansi2html
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description 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.
Title ansi2html 1.7.0a0 through 1.9.3 Cross-Site Scripting via OSC 8
First Time appeared Ansi2html Project
Ansi2html Project ansi2html
Weaknesses CWE-79
CPEs cpe:2.3:a:ansi2html_project:ansi2html:*:*:*:*:*:*:*:*
Vendors & Products Ansi2html Project
Ansi2html Project ansi2html
References
Metrics cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N'}

cvssV4_0

{'score': 5.3, 'vector': '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'}

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Sep 17, 2026, 3:38 PM
Reserved
Sep 17, 2026, 1:24 PM
Status
Deferred
Published
Sep 17, 2026, 2:18 PM
Modified
Sep 23, 2026, 5:17 PM
Severity
Moderate
Public date
Sep 17, 2026, 1:43 PM