IPBUF安全漏洞报告
English
CVE-2025-11940 CVSS 7.0 高危

CVE-2025-11940:LibreWolf安装程序未受控搜索路径漏洞

披露日期: 2025-10-19

漏洞信息

漏洞编号
CVE-2025-11940
漏洞类型
未受控搜索路径(Uncontrolled Search Path)/ 二进制劫持
CVSS评分
7.0 高危
攻击向量
本地 (AV:L)
认证要求
低权限 (PR:L)
用户交互
无需交互 (UI:N)
影响产品
LibreWolf(Windows平台)

相关标签

CVE-2025-11940LibreWolf未受控搜索路径Uncontrolled Search PathDLL劫持安装程序漏洞WindowsNSIS本地权限提升高危漏洞

漏洞概述

CVE-2025-11940是LibreWolf浏览器Windows版本安装程序中的一个高危安全漏洞。该漏洞存在于LibreWolf 143.0.4-1及之前版本的安装程序组件中,具体位于assets/setup.nsi文件中。攻击者可以利用该漏洞实施未受控搜索路径攻击(Uncontrolled Search Path),通过在特定目录中植入恶意可执行文件或DLL,当用户或系统以高权限运行安装程序时,恶意代码将以提升的权限被执行。

该漏洞的CVSS 3.1评分为7.0分,属于高危级别。其攻击向量为本地攻击(AV:L),攻击复杂度高(AC:H),需要低权限(PR:L),无需用户交互(UI:N)。一旦成功利用,攻击者可获得对目标系统的高机密性影响(C:H)、高完整性影响(I:H)和高可用性影响(A:H),意味着攻击者可能完全控制受影响的系统。

该漏洞由[email protected]报告,披露日期为2025年10月19日。LibreWolf官方已在版本144.0-1中修复了此问题,对应的补丁提交为dd10e31dd873e9cb309fad8aed921d45bf905a55。建议所有使用受影响版本的用户尽快升级到最新版本以消除安全风险。

技术细节

该漏洞的核心问题在于LibreWolf Windows安装程序(基于NSIS框架,setup.nsi脚本)在执行过程中使用了未受控的搜索路径来加载可执行文件或动态链接库(DLL)。NSIS(Nullsoft Scriptable Install System)安装程序在Windows上运行时,会按照特定的目录顺序搜索依赖的可执行文件和DLL,包括当前工作目录、应用程序目录、Windows系统目录等。

攻击原理如下:
1. 安装程序在执行过程中需要调用某些系统工具或辅助可执行文件(如cmd.exe的辅助工具或其他实用程序);
2. 由于搜索路径未受控,攻击者可以将同名的恶意可执行文件或DLL放置在搜索路径优先的目录中(如安装程序所在的当前目录);
3. 当安装程序运行时,操作系统将优先加载攻击者植入的恶意文件,而非系统原有的合法文件;
4. 由于安装程序通常以用户权限运行(甚至在某些场景下以管理员权限运行),恶意代码将继承相应的执行权限。

利用方式:攻击者需要具备目标系统的本地低权限访问权限(PR:L),将恶意文件放置在适当的目录中,然后等待用户或系统进程触发安装程序。由于攻击复杂度被评定为高(AC:H),实际利用需要特定的环境条件和时机。利用难度较大,但一旦成功,攻击者可获得对受影响系统的完全控制权,包括读取敏感数据、修改系统配置、安装持久化后门等。

攻击链分析

STEP 1
步骤1:获取本地访问权限
攻击者需要在目标Windows系统上获得本地低权限访问权限(PR:L),可以通过物理访问、社会工程学或其他已存在的低权限账户实现。
STEP 2
步骤2:分析安装程序依赖
攻击者分析LibreWolf安装程序(setup.nsi)的行为,确定其在执行过程中调用的可执行文件、DLL或其他依赖项,以及搜索路径的优先级顺序。
STEP 3
步骤3:植入恶意文件
攻击者将精心制作的恶意可执行文件或DLL放置在搜索路径优先级较高的目录中(如安装程序所在目录或当前工作目录),文件名与合法依赖项相同。
STEP 4
步骤4:触发安装程序执行
当用户或系统进程启动LibreWolf安装程序时,由于搜索路径未受控,操作系统优先加载攻击者植入的恶意文件而非系统合法文件。
STEP 5
步骤5:权限提升与持久化
恶意代码以安装程序的权限执行(可能是用户权限或管理员权限),攻击者可利用此权限读取敏感数据、安装后门、修改系统配置或实现持久化驻留。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
# CVE-2025-11940 - LibreWolf Installer Uncontrolled Search Path Exploit # This PoC demonstrates the DLL/executable hijacking concept in the LibreWolf installer # Affected: LibreWolf <= 143.0.4-1 on Windows # Component: assets/setup.nsi (NSIS Installer) import os import shutil def exploit_setup(): """ PoC for CVE-2025-11940: Uncontrolled Search Path in LibreWolf Installer The vulnerability exists because the NSIS installer (setup.nsi) loads executables/DLLs from uncontrolled search paths. An attacker with local access can place malicious files in the search path to hijack execution. Steps: 1. Identify the installation directory or current working directory 2. Place a malicious executable/DLL with the same name as a legitimate dependency in a higher-priority search path 3. Wait for the installer to be executed, triggering the hijacked code """ # Step 1: Determine target installation directory install_dir = r"C:\Program Files\LibreWolf" # Step 2: Create a malicious DLL that mimics a legitimate dependency # The NSIS installer may search for utilities in the current directory first malicious_payload = ''' // Malicious DLL payload - compiled as a DLL // When loaded by the installer, this executes with installer's privileges #include <windows.h> #include <stdlib.h> BOOL APIENTRY DllMain(HMODULE hModule, DWORD reason, LPVOID lpReserved) { if (reason == DLL_PROCESS_ATTACH) { // Execute malicious code with installer privileges system("whoami > C:\\temp\\pwned.txt"); // Add persistence, exfiltrate data, etc. } return TRUE; } ''' # Step 3: Place malicious file in the search path # NSIS searches current directory before system directories target_dll = os.path.join(install_dir, "legitimate_dependency.dll") print(f"[*] CVE-2025-11940 PoC") print(f"[*] Target: LibreWolf Installer (setup.nsi)") print(f"[*] Affected versions: <= 143.0.4-1") print(f"[*] Patched version: 144.0-1") print(f"[*] Attack vector: Uncontrolled Search Path (DLL Hijacking)") print(f"[+] Place malicious DLL in: {target_dll}") print(f"[+] Wait for installer execution to trigger payload") if __name__ == "__main__": exploit_setup()

影响范围

LibreWolf < 143.0.4-1
LibreWolf <= 144.0-1(未升级版本)

防御指南

临时缓解措施
在无法立即升级的情况下,建议采取以下临时缓解措施:1)限制系统用户的本地访问权限,确保只有可信用户能登录系统;2)使用文件系统权限(如ACL)保护LibreWolf安装目录及其父目录,防止低权限用户写入恶意文件;3)部署端点检测与响应(EDR)工具监控异常的可执行文件加载行为;4)通过组策略(GPO)限制应用程序执行路径;5)监控安装程序运行时的子进程创建和DLL加载事件,及时发现可疑活动;6)尽快升级到144.0-1版本以彻底修复该漏洞。

参考链接

快速导航: 前沿安全 最新收录域名列表 最新威胁情报列表 最新网站排名列表 最新工具资源列表 最新CVE漏洞列表