Mar 16, 2026·6 min read·58 visits
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.
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.
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.
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 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.
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.
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.
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| Product | Affected Versions | Fixed Version |
|---|---|---|
@leanprover/unicode-input-component Leanprover | <= 0.1.9 | 0.2.0 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-80 |
| Attack Vector | Network (Client-Side) |
| CVSS Score | 0.0 (Reported Placeholder) |
| EPSS Percentile | 13.35% |
| Impact | Arbitrary JavaScript Execution |
| Exploit Status | Proof of Concept |
| KEV Status | Not Listed |
Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)
CVE-2026-48861 is a client-side HTTP request-line CRLF (Carriage Return Line Feed) injection vulnerability in the popular Elixir HTTP client library, Mint. The vulnerability permits HTTP Request Splitting and HTTP Request Smuggling when an application forwards untrusted, attacker-controlled inputs to Mint's HTTP client requests as either the HTTP request method or target. By embedding CRLF characters within these parameters, an attacker can terminate the request line prematurely, inject malicious headers, or pipeline entirely independent requests. These smuggled requests are then processed by upstream or downstream proxy servers as separate HTTP queries on the same TCP connection. While Mint version 1.7.0 introduced target validation to secure the request target, the HTTP request method parameter remained completely unvalidated. This flaw allows attackers to bypass routing filters, access restricted internal APIs, or poison HTTP caches under default configurations.
An Inconsistent Interpretation of HTTP Requests (HTTP Request/Response Smuggling) vulnerability in the Elixir Mint HTTP client allows attacker-controlled HTTP/1 servers to desynchronize response framing on shared connections due to over-lenient parsing of sign-prefixed Content-Length headers.
An allocation of resources without limits or throttling vulnerability in Elixir Mint allows an attacker-controlled HTTP/2 server to exhaust memory in a Mint client. The vulnerability is exploited by sending a HEADERS frame without the END_HEADERS flag followed by an infinite stream of CONTINUATION frames. Because the client lacks limits on the incoming header-block accumulator, the client continuously consumes memory until an out-of-memory crash occurs.
CVE-2026-48596 is an Improper Neutralization of CRLF Sequences in HTTP Headers (HTTP Request/Response Splitting, CWE-113) in the Elixir Tesla HTTP client. The flaw resides in how multipart content-type parameters are joined and serialized, enabling attackers to inject arbitrary headers or split HTTP requests when applications pass untrusted inputs to the parameters of multipart uploads.
An improper handling of highly compressed data (decompression bomb) vulnerability exists in the Elixir Tesla HTTP client when utilizing response decompression middlewares. By serving highly compressed responses or stacked content-encoding headers, a malicious server can cause arbitrary heap exhaustion, leading to a denial of service (DoS) crash in the BEAM virtual machine.
A high-severity security vulnerability in Elixir's Tesla HTTP client library (CVE-2026-48595) allows unauthenticated remote attackers to harvest sensitive credentials, including Authorization headers and cookies. The flaw resides in the 'Tesla.Middleware.FollowRedirects' component, which performs case-sensitive lookups when stripping credentials during cross-origin redirects. Because HTTP headers are case-insensitive by RFC specifications, standard canonical casing (e.g., 'Authorization') bypasses the lowercase-only blocklist, leaking tokens to untrusted external redirect destinations.