{"id":"CVE-2025-66508","aliases":["GHSA-7cqv-qcq2-r765","GO-2025-4207"],"url":"https://o3.security/vulnerability/CVE-2025-66508","summary":"1Panel IP Access Control Bypass via Untrusted X-Forwarded-For Headers","details":"### Summary\nThe server trusts all reverse-proxy headers by default, so any remote client can spoof `X-Forwarded-For` to bypass IP-based protections (AllowIPs, API IP whitelist, “localhost-only” checks). All IP-based access control becomes ineffective.\n\n### Details\n- Gin is created with defaults (`gin.Default()`), which sets `TrustedProxies = 0.0.0.0/0` and uses `X-Forwarded-For`/`X-Real-IP` to compute `ClientIP()`.\n\n- IP-based controls rely on `ClientIP()`:\n    - AllowIPs / BindDomain (core/middleware/ip_limit.go, core/utils/security/security.go).\n    - API IP whitelist (core/middleware/api_auth.go).\n    - \"localhost-only\" checks that depend on `ClientIP()`.\n\n- Because no trusted-proxy range is enforced, any client can send `X-Forwarded-For: 127.0.0.1` (or a whitelisted IP) and be treated as coming from that address.\n\n### Impact\nAll IP-based access control is rendered ineffective: remote clients can masquerade as localhost or any whitelisted IP, defeating AllowIPs, API IP whitelists, and “localhost-only” protections.","published":"2025-12-09T01:37:10.219Z","modified":"2026-10-28T02:30:59.966960147Z","cvss":{"score":6.5,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"},"epss":{"score":0.00228,"percentile":0.13328,"asOf":"2026-08-24"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Go","name":"github.com/1Panel-dev/1Panel","fixedVersion":"2.0.14"},{"ecosystem":"Go","name":"github.com/1Panel-dev/1Panel/agent","fixedVersion":"0.0.0-20251201063338-94f7d78cc976"}],"fix":{"url":"https://github.com/1Panel-dev/1Panel/commit/94f7d78cc9768ee244da33e09408017d1f68b5ed","label":"1Panel-dev/1Panel@94f7d78"},"references":[{"type":"ADVISORY","url":"https://github.com/1Panel-dev/1Panel/security/advisories/GHSA-7cqv-qcq2-r765"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/66xxx/CVE-2025-66508.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-66508"},{"type":"FIX","url":"https://github.com/1Panel-dev/1Panel/commit/94f7d78cc9768ee244da33e09408017d1f68b5ed"},{"type":"PACKAGE","url":"https://github.com/1Panel-dev/1Panel"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-10-28T02:30:59.966960147Z"}}