Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-13573

CVE-2026-13573: LLVM Project Buffer Overflow Vulnerability

CVE-2026-13573 is a stack-based buffer overflow flaw in LLVM Project up to version 22.1.6 that requires local access to exploit. This post covers the technical details, affected versions, security impact, and mitigation.

Published:

CVE-2026-13573 Overview

CVE-2026-13573 is a stack-based buffer overflow [CWE-119] affecting the LLVM llvm-project compiler infrastructure through version 22.1.6. The flaw resides in the llvm::StringMap::insert function within /lib/IR/ValueSymbolTable.cpp, part of the ValueSymbolTable module. An attacker with local access and low privileges can manipulate input to trigger memory corruption on the stack. A public proof-of-concept exists, increasing the likelihood of opportunistic exploitation attempts against build environments and toolchains that process untrusted LLVM intermediate representation (IR).

Critical Impact

Local exploitation of the llvm::StringMap::insert routine can corrupt stack memory in processes that consume attacker-controlled LLVM IR, potentially degrading availability of compilation and analysis workflows.

Affected Products

  • LLVM llvm-project versions up to and including 22.1.6
  • LLVM ValueSymbolTable module (/lib/IR/ValueSymbolTable.cpp)
  • Tools and applications linking against vulnerable LLVM IR libraries

Discovery Timeline

  • 2026-06-29 - CVE-2026-13573 published to NVD
  • 2026-06-29 - Last updated in NVD database

Technical Details for CVE-2026-13573

Vulnerability Analysis

The defect lives in LLVM's symbol table handling code. llvm::StringMap::insert is invoked when ValueSymbolTable registers named values during IR construction and manipulation. When crafted input reaches this insertion path, the function writes past the bounds of a stack-allocated buffer, producing a stack-based buffer overflow classified under [CWE-119].

Because LLVM libraries are embedded in compilers, static analyzers, JIT runtimes, and language front-ends, any process that parses attacker-supplied bitcode or textual IR inherits the exposure. Exploitation requires local access with existing low-privilege credentials, and the proof-of-concept has been published publicly through the linked GitHub issue.

Root Cause

The root cause is improper restriction of operations within the bounds of a memory buffer during symbol insertion. StringMap::insert does not adequately constrain the length or layout of the data written into a stack-resident structure inside ValueSymbolTable.cpp. When symbol identifiers or associated metadata exceed expected sizes, adjacent stack memory is overwritten, corrupting saved registers, local variables, or control data.

Attack Vector

Exploitation is local. An attacker supplies a malformed LLVM IR module, bitcode file, or triggers a code path that invokes ValueSymbolTable operations with attacker-controlled symbol data. Any downstream tool, such as opt, llc, clang, or a JIT-enabled application, that processes the crafted input can be driven into the vulnerable insertion routine. The proof-of-concept archive published on the LLVM issue tracker demonstrates the trigger. Refer to the GitHub Issue #199187 and GitHub PoC File for reproduction details.

No verified code examples are available. The vulnerability mechanism is described in the referenced upstream issue rather than reproduced here.

Detection Methods for CVE-2026-13573

Indicators of Compromise

  • Unexpected crashes, aborts, or stack canary violations in clang, opt, llc, or applications embedding LLVM libraries
  • Core dumps referencing llvm::StringMap::insert or llvm::ValueSymbolTable frames
  • Presence of unexpected .ll, .bc, or IR-adjacent files staged in build or analysis directories by non-privileged users

Detection Strategies

  • Enable compiler hardening (-fstack-protector-strong, -D_FORTIFY_SOURCE=2) when building LLVM to surface overflow attempts as controlled aborts
  • Run LLVM tools under AddressSanitizer in test and CI environments to catch out-of-bounds writes originating in ValueSymbolTable.cpp
  • Track process execution telemetry for LLVM front-end tools being invoked with untrusted inputs by low-privilege accounts

Monitoring Recommendations

  • Alert on abnormal termination signals (SIGABRT, SIGSEGV) from LLVM-based binaries on multi-user build hosts
  • Log and review invocations of clang, opt, and llc against files outside sanctioned build directories
  • Monitor package inventories to identify hosts still running LLVM releases at or below 22.1.6

How to Mitigate CVE-2026-13573

Immediate Actions Required

  • Inventory systems and container images that ship LLVM llvm-project at version 22.1.6 or earlier
  • Restrict access to shared build and analysis hosts so untrusted users cannot submit arbitrary LLVM IR
  • Rebuild LLVM and dependent toolchains with stack protection and fortified source options enabled

Patch Information

At the time of publication, the LLVM project had been notified through an upstream issue report but had not released a fix. Track the GitHub Issue #199187 and the LLVM Project repository for a corrective commit or tagged release addressing ValueSymbolTable.cpp. Additional tracking is available via VulDB CVE-2026-13573.

Workarounds

  • Do not process untrusted LLVM IR, bitcode, or source that reaches ValueSymbolTable code paths on shared systems
  • Sandbox LLVM tool invocations using seccomp, containers, or per-job ephemeral users to contain potential overflow effects
  • Remove or gate JIT compilation features in applications embedding LLVM until an upstream patch is available
bash
# Configuration example
# Verify installed LLVM version and restrict tool access to trusted users
llvm-config --version
sudo chown root:trusted-builders /usr/bin/clang /usr/bin/opt /usr/bin/llc
sudo chmod 750 /usr/bin/clang /usr/bin/opt /usr/bin/llc

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.