The editorconfig-core-c library, used for parsing EditorConfig files, contains a stack-based buffer overflow vulnerability in the ec_glob() function. This flaw can be exploited by providing a specially crafted directory structure and .editorconfig file, leading to application crashes. Versions up to and including 0.12.10 are affected. The vulnerability has been addressed in version 0.12.11.
CVE-2026-40489 影响 editorconfig-core-c 库,该库是支持 EditorConfig 解析的插件的核心组件。版本高达 0.12.10 包含在 ecglob() 函数中的基于堆栈的缓冲区溢出。攻击者可以通过提供专门设计的目录结构和 .editorconfig 文件,利用此漏洞使任何使用 libeditorconfig 的应用程序崩溃。重要的是要注意,此漏洞是 CVE-2023-0341 的不完整修复,因为在 0.12.6 版本中,pcrestr 缓冲区得到了保护,但相邻的 l_pattern[8194] 堆栈缓冲区没有得到同等保护,从而使其容易受到攻击。
利用此漏洞需要攻击者控制应用程序处理的目录结构和 .editorconfig 文件的内容。这可能发生在用户可以上传文件或修改项目配置的场景中。攻击者可以创建一个包含专门设计的模式的目录结构和 .editorconfig 文件,这些模式旨在触发 ec_glob() 函数中的缓冲区溢出。利用的影响范围可能从拒绝服务(导致应用程序崩溃)到任意代码执行,具体取决于系统架构和已实施的保护措施。
Applications and systems that rely on editorconfig-core-c for parsing .editorconfig files are at risk. This includes build systems, IDEs, and code editors that integrate with EditorConfig. Shared hosting environments where multiple users share the same server and potentially have access to each other's .editorconfig files are particularly vulnerable.
• linux / server: Monitor process crashes related to applications using editorconfig-core-c. Use journalctl to filter for errors and segmentation faults.
journalctl -u <application_name> --grep='Segmentation fault'• generic web: Examine access logs for unusual file requests related to .editorconfig files, particularly requests from unknown or suspicious sources.
grep '.editorconfig' /var/log/apache2/access.logdisclosure
漏洞利用状态
EPSS
0.02% (4% 百分位)
CISA SSVC
此漏洞的主要缓解措施是将 editorconfig-core-c 升级到版本 0.12.11。此版本包含防止 ec_glob() 中基于堆栈的缓冲区溢出的必要修复。如果无法立即升级,请检查使用 libeditorconfig 的代码,以识别攻击者可能能够操纵目录结构或 .editorconfig 文件内容的潜在入口点。实施严格的输入验证并限制目录结构的复杂性有助于降低风险。监控应用程序日志中是否存在异常行为也有助于检测潜在的利用尝试。
Actualice a la versión 0.12.11 o posterior de la biblioteca editorconfig-core-c para mitigar el riesgo de desbordamiento del búfer de pila. Esta actualización corrige la vulnerabilidad al proteger el búfer de pila adyacente que no estaba protegido en versiones anteriores.
漏洞分析和关键警报直接发送到您的邮箱。
EditorConfig 是一个标准,用于在不同的编辑器和开发环境中保持一致的代码样式。
升级到版本 0.12.11 会修复一个安全漏洞,该漏洞可能允许攻击者使应用程序崩溃。
检查使用 libeditorconfig 的代码,并应用严格的输入验证。
监控应用程序日志中是否存在异常行为。
是的,它是 CVE-2023-0341 的不完整修复,解决了版本 0.12.6 中未解决的方面。