Multiple Notepad++ Flaws Let Attackers Execute Arbitrary Code

Several Buffer Overflow vulnerabilities have been discovered in Notepad++ that can be exploited by threat actors for malicious purposes. The severities of these vulnerabilities vary from 5.5 (Medium ) to 7.8 (High).

The vulnerabilities are based on heap buffer write overflow and heap buffer read overflow on some functions and libraries used by Notepad++ software, identified by Gitlab security researcher Jaroslav Lobačevski (@JarLob).

Notepad++ is an open-source C++-based source code editor that works in Microsoft x86, x64, and AArch64-based architectures. Notepad++ supports tabbed editing and allows working with multiple files in a single window. Don Ho developed it.

Notepad++ has not patched these vulnerabilities. However, according to their coordinated disclosure policy, GitLab published these vulnerabilities along with the proof-of-concept.

CVE(s):

CVE-2023-40031: Heap buffer write overflow in Utf8_16_Read::convert

Notepad++ uses a function called Utf8_16_Read::convert, which converts UTF16 to UTF8 encoding. This function has a flaw since it assumes that for every two UTF16 encoded bytes, three UTF8 encoded bytes are needed. If the chunk of bytes is set to an odd value like 9, the calculation becomes incompatible, resulting in a buffer overflow.

CVE-2023-40036: Global buffer read overflow in CharDistributionAnalysis::HandleOneChar

This vulnerability exists because the array index order is dependent on the size of the mCharToFreqOrder buffer that a threat actor can exploit by specially crafting a file leading to a Global buffer read overflow. In addition, the application also uses a uchardet library that supports this operation.

CVE-2023-40164: Global buffer read overflow in nsCodingStateMachine::NextState

A diverged copy of uchardet library is being used by Notepad++, which was found to be vulnerable to Global buffer read overflow. This was because the array index byteCls is dependent on the size of the charLenTable buffer, which a specially crafted file can exploit.

CVE-2023-40166: Heap buffer read overflow in FileManager::detectLanguageFromTextBegining

When opening a file, Notepad++ calls the function FileManager::loadFile, which allocates a fixed-size buffer, followed by FileManager::loadFileData, loading the first block of data to the buffer.

After this, it calls the detectLanguageFromTextBegining to identify the file's starting point's content type. The flaw exists since the loop FileManager::detectLanguageFromTextBegining does not check if the i+longestlength < dataLen, resulting in a buffer overflow.

Patches are yet to be confirmed by Notepad++ for fixing these vulnerabilities. GitLab has published a complete report about this vulnerability, which mentions the proof-of-concept, example code, and other information.

相关推荐
AC赳赳老秦2 天前
Kubernetes 与 DeepSeek:高效 Pod 部署配置与资源调度优化指南
人工智能·云原生·容器·kubernetes·自动化·notepad++·deepseek
漏刻有时3 天前
微信小程序学习实录14:微信小程序手写签名功能完整开发方案
学习·微信小程序·notepad++
咖啡の猫5 天前
微信小程序页面配置
微信小程序·小程序·notepad++
咖啡の猫5 天前
微信小程序WXML 模板语法
微信小程序·小程序·notepad++
花卷HJ7 天前
【微信小程序】open-type=“contact“ 客服按钮样式无法设置?隐藏 button + label 触发完美解决
微信小程序·小程序·notepad++
難釋懷10 天前
微信小程序案例 - 自定义 tabBar
微信小程序·小程序·notepad++
百锦再13 天前
AI视频生成模型从无到有:构建、实现与调试完全指南
人工智能·python·ai·小程序·aigc·音视频·notepad++
FreeBuf_14 天前
黑猫黑客组织通过伪造Notepad++网站传播窃密恶意软件
notepad++
UpYoung!15 天前
【免费开源文本编辑器】轻量级文本编辑器——Notepad++ 下载安装教程
文本编辑器·notepad++·实用工具·开源工具·运维必备·办公学习必备