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
Share

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

Lifecycle Timeline

3
Source Code Evidence Fetched
Jul 23, 2026 - 17:35 vuln.today
Analysis Generated
Jul 23, 2026 - 17:35 vuln.today
CVE Published
May 21, 2026 - 00:00 nvd
UNKNOWN (no severity yet)

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

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.

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

Share

CVE-2026-36189 vulnerability details – vuln.today

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