GHSA-8p2x-5cpm-qrqw

Suggest an improvement
Source
https://github.com/advisories/GHSA-8p2x-5cpm-qrqw
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-8p2x-5cpm-qrqw/GHSA-8p2x-5cpm-qrqw.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-8p2x-5cpm-qrqw
Aliases
Published
2026-03-25T19:54:42Z
Modified
2026-03-25T20:26:19Z
Severity
  • 5.3 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N CVSS Calculator
Summary
AVideo vulnerable to IP Address Spoofing via Untrusted HTTP Headers in getRealIpAddr()
Details

Summary

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.

Vulnerable Code

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; 
            }
        }
    }
}

Attack Scenario

  1. Attacker sends request with forged header:
X-Client-IP: 127.0.0.1

or

X-Real-IP: 192.168.1.1
  1. getRealIpAddr() returns the forged IP
  2. Any IP-based rate limiting, access control, or audit log that relies on this function is bypassed

Proof of Concept

curl -H "X-Client-IP: 127.0.0.1" \
     https://target.com/any_endpoint.php

The server now believes the request came from localhost.

Impact

  • Bypass IP-based rate limiting
  • Bypass IP-based access controls
  • Forge audit log entries
  • Potential privilege escalation if localhost is trusted
Database specific
{
    "cwe_ids":  [
        "CWE-348"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-03-25T19:54:42Z",
    "nvd_published_at":  "2026-03-23T19:16:42Z",
    "severity":  "MODERATE"
}
References

Affected packages

Packagist / wwbn/avideo

Package

Name
wwbn/avideo
Purl
pkg:composer/wwbn/avideo

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Last Affected
26.0

Affected versions

10.*
10.4
10.8
Other
11
11.*
11.1
11.1.1
11.5
11.6
12.*
12.4
14.*
14.3
14.3.1
14.4
18.*
18.0
21.*
21.0
22.*
22.0
24.*
24.0
25.*
25.0
26.*
26.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-8p2x-5cpm-qrqw/GHSA-8p2x-5cpm-qrqw.json"