Skip to main content

Uncrustify CVE-2026-36189

| EUVDEUVD-2026-31287 MEDIUM
Classic Buffer Overflow (CWE-120)
2026-05-21 mitre GHSA-c5x6-jm2x-6vfp
6.2
CVSS 3.1 · Vendor: mitre
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft C++ file with deeply nested template tokens
  2. Delivery
    Deliver crafted file to Uncrustify execution context
  3. Exploit
    Invoke uncrustify binary on crafted file
  4. Execution
    check_template writes past 1024-entry stack array bound
  5. Persist
    Stack corruption triggers process crash
  6. Impact
    CI/CD pipeline or developer tool denied service

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Buffer copy size validation
MITRE ATT&CK

1 technique across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires local invocation of the uncrustify executable against a crafted C++ source file containing template expressions complex enough to push the token counter beyond the 1024-entry stack array limit in check_template. No elevated privileges are required - the CVSS vector PR:N confirms any unprivileged user who can invoke the binary is sufficient. No special compile-time options or non-default runtime configurations are needed beyond standard Uncrustify execution. Exploitation is constrained by AV:L: the attacker must either run uncrustify directly (developer workstation) or place attacker-controlled source files in a pipeline that invokes Uncrustify automatically (CI auto-format). The impact is limited strictly to process crash (DoS); no code execution, privilege escalation, or data disclosure path has been identified. SSVC Automatable=no reflects that achieving the required token overflow requires crafted, non-trivial input rather than a trivially repeatable network request.

Impact

Real-world risk is low across every available signal. CVSS base score is 6.2 (Medium), reflecting local attack vector and availability-only impact with no confidentiality or integrity consequences. EPSS sits at 0.01% (2nd percentile), indicating near-zero likelihood of exploitation in the wild. SSVC assessment confirms Exploitation=none, Automatable=no, Technical Impact=partial - all signals are internally consistent and point toward deprioritization for most organizations. The vulnerability is not in CISA KEV. A public proof-of-concept gist (https://gist.github.com/Criticayon/5da6d6c9cf068e494347c659d01982a9) exists; however, POC availability is distinct from active exploitation and does not materially elevate practical risk here given the local attack vector and niche deployment context. The primary operational risk is disruption of CI/CD pipelines configured to auto-format untrusted code submissions via Uncrustify. There is no known privilege escalation or data exfiltration path.

Exploit ScenarioDerived

A publicly available proof-of-concept gist demonstrates the crash. An attacker submits a specially crafted C++ source file containing deeply nested template expressions to a CI/CD pipeline configured to auto-format code with Uncrustify; when the pipeline invokes the uncrustify binary on the file, check_template processes more than 1024 template tokens, overflows the stack-allocated array, and crashes the process, interrupting the build or code review workflow.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 23, 2026

Buffer overflow in Uncrustify's C++ template token checker crashes the process when parsing source files with deeply nested template expressions. The affected development snapshot Uncrustify_d-0.82.0-132-bcc41cbdc contains a fixed-size stack array of 1024 entries in check_template.cpp that lacks complete bounds enforcement at all write sites, enabling stack corruption and process termination when token count exceeds capacity. No active exploitation is confirmed (CISA KEV absent, EPSS 0.01%), though a public proof-of-concept gist exists demonstrating the crash.

RemediationAI

Apply the upstream fix available in GitHub PR #4641 (https://github.com/uncrustify/uncrustify/pull/4641), which incorporates commit 68e67b9a1435a1bb173b106fedb4a4f510972bdc. Users should rebuild Uncrustify from source at or after this commit. Note that a tagged, released patched version number was not independently confirmed from available data at time of analysis - verify the latest tagged release at https://github.com/uncrustify/uncrustify against this commit before deploying. As a compensating control where patching is not immediately possible, restrict Uncrustify in CI/CD pipelines to processing only internally trusted source files and block auto-formatting of externally submitted or untrusted code; this eliminates the primary attacker-controlled input path. The trade-off is that untrusted submissions will bypass automated formatting checks until the patch is applied.

Affected VersionsENISA

n/a n/a

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Uncrustify is an open-source C/C++/Objective-C code beautifier. The vulnerability resides in src/tokenizer/check_template.cpp within the check_template function, called during tokenize_cleanup to classify C++ angle-bracket template constructs. The original code allocated a fixed-size stack array E_Token tokens[1024] to record template token types. Analysis of GitHub PR #4641 reveals the root cause: at one write site, tokens[num_tokens] = CT_PAREN_OPEN was executed before a bounds check using the threshold max_token_count - 1 = 1023 was consistently enforced, allowing writes at index 1023 and potentially beyond under certain token sequences. The fix in commit 68e67b9a doubles the buffer to 2048 and inserts explicit fatal-exit guards (exit(EX_SOFTWARE)) immediately before each array write, ensuring no out-of-bounds write occurs. CWE-120 (Buffer Copy without Checking Size of Input) applies precisely: a bounded stack buffer is written without uniformly enforced pre-write size checks. NVD CPE data is unfilled (cpe:2.3:a:n/a:n/a:*), so version range boundaries must be inferred from commit history rather than official CPE records.

Know when N A gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (mitre) PRIMARY 6.2 MEDIUM
AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
vuln.today AI 6.2 MEDIUM

Local vector (AV:L) since exploitation requires running the binary on a crafted file; PR:N because no privileges are needed to invoke Uncrustify; impact is crash-only, so A:H with C and I at N.

3.1 AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (mitre).

CVSS VectorVendor: mitre

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

DescriptionCVE.org

Buffer Overflow vulnerability in Uncrustify Project Affected v.Uncrustify_d-0.82.0-132-bcc41cbdc and Fixed in commit 68e67b9a1435a1bb173b106fedb4a4f510972bdc allows a local attacker to cause a denial of service via the check_template.cpp, check_template function, tokenize_cleanup function, uncrustify executable components

Threat Intelligence Overview

EPSS Score
0.0%
Top 98% exploitable
Prevalence
Low
developer code-formatting tool, not production infrastructure
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available No
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

31
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +31
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

More in N A

View all
CVE-2024-51092 CRITICAL POC
9.1 May 08

LibreNMS before 24.10.0 allows a remote attacker to execute arbitrary code via OS command injection involving AboutContr

CVE-2025-15684 MEDIUM POC
5.5 Aug 12

Reachable assertion in Open5GS up to version 2.7.6 allows remote unauthenticated attackers to crash the Diameter CER han

CVE-2024-45257 HIGH POC
7.3 May 08

A Command Injection issue in the payload build page in BYOB (Build Your Own Botnet) 2.0 allows attackers to execute arbi

CVE-2025-15687 LOW POC
2.1 Aug 12

Denial of service in Open5GS 2.7.6 and earlier allows network-adjacent attackers with low-privilege Diameter Gx peer acc

CVE-2025-15686 LOW POC
2.1 Aug 12

Denial of service in Open5GS HSS (Home Subscriber Server) versions 2.7.0 through 2.7.6 is triggered remotely by manipula

CVE-2025-67888 HIGH POC
7.3 May 08

Remote command injection in Control Web Panel allows unauthenticated attackers to execute arbitrary OS commands as root

CVE-2024-53326 HIGH POC
7.3 May 08

LINQPad before 5.52.01 Pro edition is vulnerable to Unsafe Deserialization in LINQPad.AutoRefManager::PopulateFromCache(

CVE-2026-38360 CRITICAL POC
9.8 May 08

Remote code execution in dash-uploader (Python package for Plotly Dash) versions 0.1.0 through 0.7.0a2 allows unauthenti

CVE-2026-30623 CRITICAL POC
9.8 Jul 15

Command injection in LiteLLM 1.18.10 lets attackers who can configure MCP (Model Context Protocol) servers supply arbitr

CVE-2026-67917 CRITICAL POC
9.8 Aug 17

SQL injection in AzuraCast's backup restore flow (versions up to and including 0.23.7) lets an attacker achieve privileg

CVE-2026-75337 CRITICAL POC
9.8 Aug 27

Arbitrary file read in Yu AI Code Mother v4.3 lets anonymous, remote attackers retrieve files outside the intended previ

CVE-2026-31072 CRITICAL POC
9.8 May 19

Remote code execution in APScheduler (all versions through 3.10.x and 4.0.0a5) is achievable when applications deseriali

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy