CVE-2026-40489 Details
Description
editorconfig-core-c is an EditorConfig core library for use by plugins supporting EditorConfig parsing. Versions up to and including 0.12.10 have a stack-based buffer overflow in ec_glob() that allows an attacker to crash any application using libeditorconfig by providing a specially crafted directory structure and .editorconfig file. This is an incomplete fix for CVE-2023-0341. The pcre_str buffer was protected in 0.12.6 but the adjacent l_pattern[8194] stack buffer received no equivalent protection. On Ubuntu 24.04, FORTIFY_SOURCE converts the overflow to SIGABRT (DoS). Version 0.12.11 contains an updated fix.
A stack-based buffer overflow vulnerability has been identified in the EditorConfig Core C library, specifically in versions through 0.12.10. The issue arises in the ec_glob() function, where an unbounded strcpy operation allows an attacker to overwrite the stack. This vulnerability can be exploited by crafting a specific directory structure and .editorconfig file, leading to a crash of any application that uses libeditorconfig. On Ubuntu 24.04, this overflow is converted into a SIGABRT signal, causing a denial-of-service condition. This vulnerability represents an incomplete fix for CVE-2023-0341, as the pcre_str buffer was properly protected in version 0.12.6, but the adjacent l_pattern stack buffer remained vulnerable.
Users can upgrade to EditorConfig Core C version 0.12.11, which includes a proper fix for this vulnerability.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Apr 18, 2026CISA-ADP
Assessed Apr 20, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/editorconfig/editorconfig-core-c/commit/5159be88ad50641d9843289adda791ba300421ff | [email protected] | Source CodeVendor |
| https://github.com/editorconfig/editorconfig-core-c/releases/tag/v0.12.11 | [email protected] | Release NotesVendor |
| https://github.com/editorconfig/editorconfig-core-c/security/advisories/GHSA-97xg-vrcq-254h | [email protected] | AdvisoryExploitTechnical DescriptionVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-121 | Stack-based Buffer Overflow | [email protected] |
| CWE-787 | Out-of-bounds Write | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| editorconfig-core-c | All versions |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Apr 18, 2026 | New CVE Received | [email protected] |
Volerion