CVE Professor
/
All CVEs
CVE-2026-137326

CVE-2026-137326 — Unicode ICU4C (79.1) — CWE-416

HIGH CVSS 7.3 NVD

ICU4C through 79.1 contains a use-after-free and double free vulnerability in the x11-compound-text converter because cloning shares the extraInfo block without a safeClone handler. Attackers who control the charset name passed to ucnv_open() in applications calling ucnv_setSubstString() or cloning converters can corrupt the heap, causing crashes and potentially code execution.

ICU4C through 79.1 contains a use-after-free and double free vulnerability in the x11-compound-text converter because cloning shares the extraInfo block without a safeClone handler. Attackers who control the charset name passed to ucnv_open() in applications calling ucnv_setSubstString() or cloning converters can corrupt the heap, causing crashes and potentially code execution.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
Attack Vector Local AV:L
Attack Complexity High AC:H
Privileges Req. None PR:N
User Interaction Required UI:R
Scope Unchanged S:U
Confidentiality High C:H
Integrity High I:H
Availability High A:H
AI Security Analysis & Remediation

🎯 What is this vulnerability?

This vulnerability is a Use-After-Free (UAF) and Double-Free flaw (CWE-416) located within the ICU4C (International Components for Unicode) library, specifically affecting versions up to and including 79.1.

The core technical defect resides in the X11 Compound Text converter (x11-compound-text). When a converter instance is cloned, the internal extraInfo block is shared between the original and the cloned instance. Crucially, the x11-compound-text converter lacks a proper safeClone handler. In standard C++ memory management for ICU converters, safeClone is responsible for deep-copying resources or establishing proper reference counting to prevent premature deallocation.

Because this handler is missing, the following sequence occurs:
1. An application opens a converter using ucnv_open().
2. The application clones the converter (e.g., via ucnv_clone() or implicitly through certain API calls).
3. Both the original and the clone point to the same extraInfo memory block.
4. When one instance is destroyed or its state is modified in a way that triggers cleanup, the shared extraInfo block is freed.
5. Subsequent access to the extraInfo block by the other instance (or a second free operation) results in a Use-After-Free or Double-Free.

This memory corruption allows an attacker to manipulate heap metadata. By controlling the contents of the freed memory (via the charset name or substitution strings), an attacker can potentially hijack control flow (e.g., overwriting vtable pointers or function pointers) to achieve arbitrary code execution.

⚡ Attack Chain

1. Discovery & Reconnaissance

  • Target Identification: The attacker identifies applications that link against ICU4C and utilize the X11 Compound Text converter. This is common in:
  • * Desktop applications with internationalization (i18n) support running on Linux/X11. * Server-side applications that process user-supplied charset names or text data using ICU for encoding conversion. * Browsers or email clients that handle complex text rendering.
  • Version Fingerprinting: The attacker checks the version of the libicu libraries linked to the target process (e.g., via ldd on the target system if local access is available, or by analyzing error messages/behavior that might leak version info). Versions $\le$ 79.1 are vulnerable.
  • Attack Vector Analysis: The CVSS vector AV:L (Local) and UI:R (User Interaction Required) indicates that the attacker needs local access to the system or the ability to trick a user into interacting with a malicious file or application. The PR:N (No Privileges Required) suggests that a standard user account is sufficient to trigger the bug, but the impact is high because the vulnerable code runs in a context that can be escalated or leads to RCE in the user's session.
  • 2. Exploitation

    The exploitation relies on heap grooming and precise memory corruption. The attacker must control the charset name passed to ucnv_open() or the substitution string set via ucnv_setSubstString().

    Illustrative PoC Concept (C Code):
    Note: This is a conceptual representation of the vulnerability trigger. Actual exploitation requires precise heap layout manipulation, which is highly dependent on the specific application, allocator (glibc, jemalloc, etc.), and ASLR/PIE settings.

    #include <unicode/ucnv.h>
    #include <stdio.h>
    #include <stdlib.h>
    
    // Illustrative function to trigger the UAF/Double-Free
    void trigger_vulnerability() {
        UConverter *conv1 = NULL;
        UConverter *conv2 = NULL;
        UErrorCode status = U_ZERO_ERROR;
    
        // 1. Open the vulnerable X11 Compound Text converter
        // The charset name "X11-Compound-Text" triggers the specific code path
        conv1 = ucnv_open("X11-Compound-Text", &status);
        if (U_FAILURE(status)) {
            fprintf(stderr, "Failed to open converter: %s\n", u_errorName(status));
            return;
        }
    
        // 2. Set a substitution string. This may influence the heap layout
        // or the contents of the extraInfo block.
        ucnv_setSubstString(conv1, "MALICIOUS_PAYLOAD", &status);
    
        // 3. Clone the converter. This shares the extraInfo block.
        conv2 = ucnv_clone(conv1, &status);
        if (U_FAILURE(status)) {
            fprintf(stderr, "Failed to clone converter: %s\n", u_errorName(status));
            return;
        }
    
        // 4. Destroy the first converter. This frees the shared extraInfo block.
        ucnv_close(conv1);
    
        // 5. Use the cloned converter. This accesses the freed memory (UAF).
        // If the heap has been groomed, this access can be redirected.
        // For example, if the freed memory is reallocated to an attacker-controlled
        // object, the converter's internal pointers may now point to attacker data.
        char out[256];
        int32_t outLen = sizeof(out);
        const char *in = "test";
        int32_t inLen = 4;
        int32_t inOffset = 0;
        int32_t outOffset = 0;
    
        // This call may trigger the UAF if the extraInfo is accessed during conversion
        ucnv_toUChars(conv2, out, outLen, in, inLen, inOffset, outOffset, &status);
    
        // 6. Close the second converter. This may trigger a Double-Free if the
        //    extraInfo block is freed again.
        ucnv_close(conv2);
    }
    
    int main() {
        trigger_vulnerability();
        return 0;
    }

    Exploitation Mechanics:
    1. Heap Grooming: The attacker allocates and frees specific objects to position the freed extraInfo block at a known location in the heap.
    2. Controlled Re-allocation: The attacker allocates a new object (e.g., a string or struct) that occupies the same memory location as the freed extraInfo block.
    3. Pointer Overwrite: The attacker crafts the contents of this new object to overwrite the function pointers or vtable pointers within the extraInfo structure.
    4. Trigger: When the cloned converter (conv2) is used or destroyed, it dereferences the corrupted pointers, leading to execution of attacker-controlled code.

    3. Post-Exploitation

  • Code Execution: Successful exploitation results in arbitrary code execution in the context of the vulnerable application.
  • Privilege Escalation: If the vulnerable application runs with elevated privileges (e.g., a system service, a setuid binary, or a browser sandbox escape), the attacker can escalate privileges to root or system.
  • Data Exfiltration: The attacker can read sensitive data from the application's memory, such as credentials, session tokens, or personal information.
  • Persistence: The attacker can install backdoors, modify system files, or create new user accounts to maintain access.
  • 🌍 Real World Impact

  • Confidentiality (High): An attacker can read arbitrary memory, potentially exposing sensitive data such as passwords, API keys, or personal information.
  • Integrity (High): An attacker can modify application data or system files, leading to corruption or unauthorized changes.
  • Availability (High): The vulnerability can cause crashes (denial of service) by triggering segmentation faults or aborts. In severe cases, it can lead to system instability.
  • Practical Consequences:

  • Desktop Applications: Users of applications that use ICU for text processing (e.g., office suites, email clients, browsers) may be vulnerable to local attacks. A malicious document or file could trigger the vulnerability when opened.

  • Server-Side Applications: If a web server or API uses ICU for charset conversion and accepts user-supplied charset names, it could be vulnerable to remote code execution if the attack vector can be triggered remotely (though the CVSS vector indicates local access is required, which may limit remote exploitability).

  • Browser Exploitation: Browsers that use ICU for text rendering may be vulnerable to drive-by attacks if a malicious web page can trigger the vulnerable code path.
  • 🛡️ Remediation & Mitigation

    1. Upgrade

  • Affected Versions: ICU4C through 79.1.
  • Recommendation: Upgrade to the latest stable version of ICU4C where the safeClone handler has been implemented for the x11-compound-text converter. Check the official ICU4C release notes for the specific version that fixes this issue.
  • 2. Workarounds

  • Disable X11 Compound Text Converter: If the application does not require the X11 Compound Text converter, configure it to use a different charset converter (e.g., UTF-8, ISO-8859-1). This can be done by avoiding the use of the "X11-Compound-Text" charset name in ucnv_open().
  • Input Validation: Strictly validate and sanitize any user-supplied charset names before passing them to ucnv_open(). Reject any charset names that are not in a predefined whitelist of safe charsets.
  • Memory Protection: Enable compiler and runtime protections such as Address Space Layout Randomization (ASLR), Position Independent Executables (PIE), and stack canaries. These make exploitation more difficult but do not eliminate the risk.
  • 3. Detection

  • Log Analysis: Monitor application logs for crashes or segmentation faults that occur when processing text data with unusual charset names.
  • File Integrity Monitoring (FIM): Monitor for unexpected changes to system binaries or libraries that may indicate exploitation or persistence.
  • Network Traffic Analysis: Look for unusual outbound connections from the vulnerable application, which may indicate data exfiltration or command-and-control communication.
  • ⚠️ Urgency

  • CVSS Score: 7.0 (HIGH)
  • CISA KEV: No
  • Exploit Complexity: High (requires precise heap grooming and control over memory layout)
Patching Priority: Medium-High

While the CVSS score is high, the attack complexity is also high, and the attack vector is local. This means that remote exploitation is unlikely without additional vulnerabilities or user interaction. However, for environments where local access is a concern (e.g., multi-user systems, desktop environments), patching should be prioritized. For server-side applications, the risk is lower unless the application accepts user-supplied charset names and runs with elevated privileges.

Recommendation:
1. Immediate: Upgrade ICU4C to the latest patched version.
2. Short-term: Implement input validation for charset names and disable the X11 Compound Text converter if not needed.
3. Long-term: Monitor for any public exploits or proof-of-concept code and adjust defenses accordingly.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="Unicode ICU4C"
PoC & Exploit Intelligence (GitHub)
Technical reference / advisory repository for CVE-2026-137326
Technical reference / advisory repository for CVE-2026-137326
Technical reference / advisory repository for CVE-2026-137326
CVSS Score
7.3 / 10 · CVSS HIGH
Weakness Types (CWE)
CWE-416
Affected Products (1)
Unicode:ICU4C (79.1)
Related CVEs
7.4
CVE-2026-126604
sanitize-filename (PyPI) < 1.2.1 is vulnerable to path traversal attacks. sanitize() removed blacklisted chara
0.0
CVE-2026-14534
# Analysis The fix adds `_posixsubprocess`, `site` and `atexit` to the blocklist (https://github.com/trailofb
0.0
CVE-2026-142790
In the Linux kernel, the following vulnerability has been resolved: smb: client: fix OOB read in the SMB_FIND
6.5
CVE-2026-145059
FreeRDP from 3.25.0 before 3.33.1 contains a use-after-free in the RDPEWA client because notifyWait does not j
6.3
CVE-2026-144771
A flaw has been found in SGLang up to 0.5.23. The affected element is the function try_match_prefix of the fil
5.8
CVE-2026-144210
In Eclipse Safe Open Vehicle Core (S-CORE) Kyron versions 0.0.3 through 0.2.0, `SpmcStealQueue::fetch_from` in
7.0
CVE-2026-86092
The user-mode verifier for the I2S configure system call, z_vrfy_i2s_configure() in drivers/i2s/i2s_handlers.c