CVE-2025-65328 Details
Description
Mega-Fence (webgate-lib.*) 25.1.914 and prior trusts the first value of the X-Forwarded-For (XFF) header as the client IP without validating a trusted proxy chain. An attacker can supply an arbitrary XFF value in a remote request to spoof the client IP, which is then propagated to security-relevant state (e.g., WG_CLIENT_IP cookie). Deployments that rely on this value for IP allowlists may be bypassed.
A vulnerability exists in Mega-Fence (webgate-lib.*) versions through 25.1.914, where the application improperly trusts the first value of the X-Forwarded-For (XFF) header as the client IP. This trust is granted without validating the authenticity of the proxy chain, allowing remote, unauthenticated attackers to spoof client IP addresses. The spoofed IP is then propagated to security-sensitive states, such as the WG_CLIENT_IP cookie. This vulnerability can bypass IP allowlists and other access controls that rely on the accuracy of the client IP.
To address this vulnerability, Mega-Fence deployments should only trust X-Forwarded-For headers from requests where the REMOTE_ADDR is within a configured trusted proxy CIDR range. It is also recommended to establish a clear precedence order for multiple IP-related headers and to default to ignoring client-supplied IP headers unless explicitly enabled and documented.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jan 5, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://drive.proton.me/urls/MY05PVBFXG#xDd2Xqy98WM9 | [email protected] | Broken Link |
| https://raw.githubusercontent.com/p1aintext/CVE/main/CVE-2025-65328.md | [email protected] | ExploitThird Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-807 | Reliance on Untrusted Inputs in a Security Decision | CISA-ADP |
Affected Products
| Product | Versions |
|---|---|
| mega-fence project mega-fence | <= 25.1.914 |
CPE
Remediation
| |
Change History
6 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Nov 4, 2026 | CVE Translated | [email protected] |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jan 30, 2026 | Initial Analysis | [email protected] |
| Jan 5, 2026 | CVE Modified | CISA-ADP |
| Jan 5, 2026 | New CVE Received | [email protected] |