{"schema_version":"1.7.3","id":"GHSA-7cqv-qcq2-r765","published":"2025-12-08T17:56:57Z","modified":"2025-12-17T01:01:43.236248Z","aliases":["CVE-2025-66508","GO-2025-4207"],"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.","affected":[{"package":{"name":"github.com/1Panel-dev/1Panel","ecosystem":"Go","purl":"pkg:golang/github.com/1Panel-dev/1Panel"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.0.14"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/12/GHSA-7cqv-qcq2-r765/GHSA-7cqv-qcq2-r765.json"}},{"package":{"name":"github.com/1Panel-dev/1Panel/agent","ecosystem":"Go","purl":"pkg:golang/github.com/1Panel-dev/1Panel/agent"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.0.0-20251201063338-94f7d78cc976"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/12/GHSA-7cqv-qcq2-r765/GHSA-7cqv-qcq2-r765.json"}}],"references":[{"type":"WEB","url":"https://github.com/1Panel-dev/1Panel/security/advisories/GHSA-7cqv-qcq2-r765"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-66508"},{"type":"WEB","url":"https://github.com/1Panel-dev/1Panel/commit/94f7d78cc9768ee244da33e09408017d1f68b5ed"},{"type":"PACKAGE","url":"https://github.com/1Panel-dev/1Panel"}],"database_specific":{"cwe_ids":["CWE-290"],"github_reviewed":true,"github_reviewed_at":"2025-12-08T17:56:57Z","nvd_published_at":"2025-12-09T16:18:19Z","severity":"MODERATE"},"severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"}]}