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
Lifecycle Timeline
3DescriptionCVE.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
AnalysisAI
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.
Technical ContextAI
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.
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.
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
Same weakness CWE-120 – Classic Buffer Overflow
View allSame technique Buffer Overflow
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-31287
GHSA-c5x6-jm2x-6vfp