Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft C++ file with deeply nested template tokens
-
DeliveryDeliver crafted file to Uncrustify execution context
-
ExploitInvoke uncrustify binary on crafted file
-
Executioncheck_template writes past 1024-entry stack array bound
-
PersistStack corruption triggers process crash
-
ImpactCI/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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
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
AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
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.
Primary rating from Vendor (mitre).
CVSS VectorVendor: mitre
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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
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.
LibreNMS before 24.10.0 allows a remote attacker to execute arbitrary code via OS command injection involving AboutContr
Reachable assertion in Open5GS up to version 2.7.6 allows remote unauthenticated attackers to crash the Diameter CER han
A Command Injection issue in the payload build page in BYOB (Build Your Own Botnet) 2.0 allows attackers to execute arbi
Denial of service in Open5GS 2.7.6 and earlier allows network-adjacent attackers with low-privilege Diameter Gx peer acc
Denial of service in Open5GS HSS (Home Subscriber Server) versions 2.7.0 through 2.7.6 is triggered remotely by manipula
Remote command injection in Control Web Panel allows unauthenticated attackers to execute arbitrary OS commands as root
LINQPad before 5.52.01 Pro edition is vulnerable to Unsafe Deserialization in LINQPad.AutoRefManager::PopulateFromCache(
Remote code execution in dash-uploader (Python package for Plotly Dash) versions 0.1.0 through 0.7.0a2 allows unauthenti
Command injection in LiteLLM 1.18.10 lets attackers who can configure MCP (Model Context Protocol) servers supply arbitr
SQL injection in AzuraCast's backup restore flow (versions up to and including 0.23.7) lets an attacker achieve privileg
Arbitrary file read in Yu AI Code Mother v4.3 lets anonymous, remote attackers retrieve files outside the intended previ
Remote code execution in APScheduler (all versions through 3.10.x and 4.0.0a5) is achievable when applications deseriali
EUVD-2026-31287
GHSA-c5x6-jm2x-6vfp
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB