CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-32732

CVE-2026-32732: Cross-Site Scripting (XSS) in @leanprover/unicode-input-component

Amit Schendel
Amit Schendel
Senior Security Researcher

Mar 16, 2026·6 min read·87 visits

Executive Summary (TL;DR)

A CWE-80 vulnerability in @leanprover/unicode-input-component <= 0.1.9 allows XSS via unescaped DOM insertion during text rendering. Fixed in version 0.2.0 by introducing HTML entity encoding.

The @leanprover/unicode-input-component npm package, utilized by the Lean 4 VS Code Extension, contains a Cross-Site Scripting (XSS) vulnerability. Versions 0.1.9 and lower fail to properly neutralize script-related HTML tags during unicode abbreviation processing, leading to arbitrary JavaScript execution in the client context.

Vulnerability Overview

The @leanprover/unicode-input-component package provides unicode abbreviation processing for the Lean 4 VS Code extension and related web applications. It allows users to type standard ASCII sequences, such as \alpha, and dynamically converts them into corresponding unicode characters. This functionality improves the developer experience when writing mathematical and formal logic proofs in Lean.

CVE-2026-32732 identifies a Cross-Site Scripting (XSS) vulnerability within this component's text rendering pipeline. The flaw occurs because the component improperly neutralizes script-related HTML tags when updating the input element's Document Object Model (DOM) representation. Specifically, user-supplied text strings are processed and inserted directly into the innerHTML property without adequate sanitization.

This vulnerability is classified as CWE-80, representing a basic XSS condition. Applications utilizing this component for user input, such as the Loogle search bar or the Lean 4 extension interface, inherit this exposure. The defect manifests in versions 0.1.9 and lower of the npm package.

The impact of this vulnerability depends on the context of the hosting application. If the component processes input within a web-based interface, an attacker can execute arbitrary JavaScript in the context of the user's session. The issue was resolved in version 0.2.0 by implementing proper HTML entity encoding before DOM insertion.

Root Cause Analysis

The root cause of CVE-2026-32732 lies in the direct concatenation of unescaped user input into HTML strings meant for DOM rendering. The component uses a custom function named replaceAt to manage the conversion of abbreviations and the application of visual highlights, such as underlining active abbreviation targets.

During this text transformation process, the component slices the original input string into segments. These segments are divided based on the location of identified abbreviations. The vulnerable implementation appends these raw, unescaped string slices directly into a new string variable designed to represent the updated HTML content.

Because the string slices bypass any sanitization routines, any HTML tags present in the original user input remain intact. When the application subsequently assigns this newly constructed string to the innerHTML property of the input field element, the browser parses and executes the embedded HTML and JavaScript.

The vulnerability is triggered under the condition that the component processes input containing structural HTML characters, specifically less-than and greater-than signs. The component's failure to distinguish between literal text intended for display and functional HTML markup creates the injection vector.

Code Analysis

The vulnerable implementation resides in lean4-unicode-input-component/src/index.ts. The replaceAt function iterates over an array of identified abbreviation updates. Inside the loop, it slices the original string from the last untouched position to the start of the current abbreviation offset.

function replaceAt(str: string, updates: { range: Range; update: (old: string) => string }[]): string {
    // ...
    for (const u of updates) {
        newStr += str.slice(lastUntouchedPos, u.range.offset) // Vulnerable: unescaped slice
        newStr += u.update(str.slice(u.range.offset, u.range.offsetEnd + 1))
        lastUntouchedPos = u.range.offset + u.range.length
    }
    newStr += str.slice(lastUntouchedPos) // Vulnerable: unescaped slice
    return newStr
}

As shown in the vulnerable snippet, the result of str.slice(lastUntouchedPos, u.range.offset) is appended directly to newStr. If str contains a payload such as <img src=x onerror=alert()> before an abbreviation, the raw payload is written into newStr.

The patch introduced in commit 14b7a105c89d2819c5e78970fd258393f76453bb resolves this by adding an escapeHtml utility function. This function performs static string replacements for critical HTML control characters: &, <, >, `

Exploitation Methodology

Exploitation of CVE-2026-32732 requires the attacker to supply crafted input to an application utilizing the vulnerable @leanprover/unicode-input-component. The attacker must identify an input vector that feeds directly into the component's text processing and abbreviation resolution logic.

A standard proof-of-concept payload targets the lack of tag sanitization. An attacker can input a string such as <img src=x onerror=alert(document.domain)> \alpha. The inclusion of the \alpha triggers the abbreviation resolution mechanism, invoking the vulnerable replaceAt function.

When the component processes this input, it slices the string containing the img tag and appends it unescaped to the internal HTML representation. The browser then renders the img tag, fails to load the source x, and immediately executes the JavaScript payload defined in the onerror event handler.

This attack does not require authentication or specific network positioning, provided the target input field is publicly accessible. The execution occurs entirely on the client side, running within the security context of the user viewing or interacting with the malicious input.

Impact Assessment

The impact of CVE-2026-32732 is scoped to the client-side execution environment of the application integrating the vulnerable package. Because it is a Cross-Site Scripting vulnerability, an attacker gains the ability to execute arbitrary JavaScript within the browser session of a victim user.

Successful exploitation allows the attacker to perform actions on behalf of the user. This includes accessing sensitive session tokens, reading data displayed in the application interface, and issuing unauthorized requests to the backend server. The exact severity scales with the privileges and data access granted to the compromised user session.

The reported CVSS 4.0 score of 0.0 appears to be an anomaly or placeholder from the reserving CNA, as the vector CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:N/SI:N/SA:N indicates no impact across all metrics. A more accurate assessment for unauthenticated, stored or reflected XSS typically yields a medium to high severity score, depending on the operational context.

Despite the low reported CVSS score, the Exploit Prediction Scoring System (EPSS) assigns a probability of 0.00045, placing it in the 13.35th percentile. The vulnerability is currently recognized at the proof-of-concept maturity level, with no active exploitation recorded in CISA's Known Exploited Vulnerabilities (KEV) catalog.

Remediation and Mitigation

The primary remediation strategy for CVE-2026-32732 is to upgrade the @leanprover/unicode-input-component package to version 0.2.0 or higher. This version contains the official patch implemented in pull request #735, which securely encodes HTML entities during the text rendering process.

Development teams must update their package.json dependencies and regenerate lockfiles to ensure the patched version is pulled during build processes. Applications utilizing the component in production environments should be redeployed with the updated dependency to eliminate the XSS vector.

In environments where an immediate upgrade is impossible, developers can implement a temporary workaround. This involves manually sanitizing all user input before passing it to the unicode input component. A reliable HTML sanitization library, such as DOMPurify, should be used to strip script tags and event handlers from the input.

Alternatively, teams can temporarily replace the unicode input component with a standard HTML <input> or <textarea> element. While this degrades the user experience by removing dynamic abbreviation resolution, it entirely mitigates the vulnerability until the package can be safely updated.

Official Patches

LeanproverPull Request #735 (Fix)
LeanproverRaw patch file containing the fix

Fix Analysis (1)

Technical Appendix

CVSS Score
0.0/ 10
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:N/SI:N/SA:N
EPSS Probability
0.04%
Top 87% most exploited

Affected Systems

@leanprover/unicode-input-component <= 0.1.9vscode-lean4 extension

Affected Versions Detail

Product
Affected Versions
Fixed Version
@leanprover/unicode-input-component
Leanprover
<= 0.1.90.2.0
AttributeDetail
CWE IDCWE-80
Attack VectorNetwork (Client-Side)
CVSS Score0.0 (Reported Placeholder)
EPSS Percentile13.35%
ImpactArbitrary JavaScript Execution
Exploit StatusProof of Concept
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
CWE-80
Improper Neutralization of Script-Related HTML Tags in a Web Page

Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)

Known Exploits & Detection

Zulip DiscussionInitial report describing anomalous behavior in the Loogle searchbar caused by the XSS payload.

Vulnerability Timeline

Vulnerability reported on Zulip and fix committed
2026-03-11
GHSA and CVE-2026-32732 published
2026-03-13
NVD record updated
2026-03-16

References & Sources

  • [1]GitHub Security Advisory (GHSA-6ggm-pwr9-r5h2)
  • [2]Pull Request #735
  • [3]Zulip Discussion on Root Cause

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•1 day ago•CVE-2026-11748
6.9

CVE-2026-11748: Unauthenticated LDAP Injection in Central Dogma Server Authentication

An LDAP injection vulnerability exists in the centraldogma-server-auth-shiro module of LY Corporation Central Dogma before version 0.84.0. The search logic dynamically constructs LDAP search filters by interpolating user-provided usernames without escaping RFC 4515 metacharacters. Unauthenticated remote attackers can leverage this flaw to bypass authentication, enumerate directory hierarchies, and access unauthorized resources.

Alon Barad
Alon Barad
9 views•6 min read
•1 day ago•CVE-2026-11746
9.4

CVE-2026-11746: Use of Hard-coded ZooKeeper Replication Secret 'ch4n63m3' in Central Dogma Server

CVE-2026-11746 is a critical vulnerability in Central Dogma Server prior to version 0.84.0, where an embedded ZooKeeper replication secret silently falls back to a publicly known, hard-coded default string ('ch4n63m3'). Remote attackers with access to the replication network can authenticate as legitimate cluster peers, potentially leading to unauthorized data exposure, state manipulation, or complete cluster takeover.

Amit Schendel
Amit Schendel
7 views•6 min read
•1 day ago•CVE-2026-56665
4.2

CVE-2026-56665: Logical Validation Bypass in ZITADEL External JWT Identity Provider

A logical verification flaw in ZITADEL's external JWT Identity Provider validation allows attackers to bypass session expiration checks. If an incoming JWT lacks the 'exp' claim, the system skips validation entirely, creating an indefinitely valid session. This issue has been addressed in versions 3.4.12 and 4.15.2.

Alon Barad
Alon Barad
6 views•7 min read
•1 day ago•CVE-2026-59149
6.5

CVE-2026-59149: Sibling Directory Path Traversal in Mockoon Backend Server

CVE-2026-59149 identifies a directory traversal vulnerability in `@mockoon/commons-server`, the backend mock-server library powering the Mockoon application. The flaw occurs in the path containment validation logic used during raw file response generation. An unauthenticated attacker can exploit this weakness to retrieve arbitrary files from sibling directories sharing a common prefix with the designated static base directory.

Amit Schendel
Amit Schendel
9 views•5 min read
•1 day ago•CVE-2026-59148
8.8

CVE-2026-59148: Unauthenticated Administrative API and CORS Misconfiguration in Mockoon

An in-depth analysis of CVE-2026-59148, a high-severity flaw in Mockoon where unauthenticated administrative endpoints and a wildcard Cross-Origin Resource Sharing (CORS) policy allow remote execution, state poisoning, and credential theft.

Alon Barad
Alon Barad
11 views•6 min read
•1 day ago•CVE-2026-56666
4.8

CVE-2026-56666: Account Takeover via Improper Email Verification in ZITADEL Federated Identity Handler

An improper authentication vulnerability (CWE-287) in ZITADEL's external identity provider handler before version 4.15.3 allows remote attackers to perform complete account takeover. When auto-linking by email is enabled, ZITADEL verifies that the local target account has a verified email address but fails to verify if the external provider confirmed ownership of that same email. Attackers can exploit this by registering an unverified account with a victim's email address on a permissive external provider, leading to unauthorized account binding and persistent access.

Amit Schendel
Amit Schendel
7 views•7 min read