Know every vulnerabilitybefore it knows you.
DevGuard continuously monitors your dependencies and alerts you when CVEs like this one affect your stack — with real-time threat intelligence built for developers.
GHSA-7cqv-qcq2-r765
No affected components available
Summary
The 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.
Details
-
Gin is created with defaults (
gin.Default()), which setsTrustedProxies = 0.0.0.0/0and usesX-Forwarded-For/X-Real-IPto computeClientIP(). -
IP-based controls rely on
ClientIP():- AllowIPs / BindDomain (core/middleware/ip_limit.go, core/utils/security/security.go).
- API IP whitelist (core/middleware/api_auth.go).
- "localhost-only" checks that depend on
ClientIP().
-
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.
Impact
All 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.
The vulnerability can be exploited over the network without needing physical access. It is easy for an attacker to exploit this vulnerability. An attacker does not need any special privileges or access rights. No user interaction is needed for the attacker to exploit this vulnerability. The impact is confined to the system where the vulnerability exists. There is a low impact on the confidentiality of the information. There is a low impact on the integrity of the data.
Exploitation attempts have been detected. Elevated vigilance and prompt remediation are advised.
The exploit probability is very low. The vulnerability is unlikely to be exploited in the next 30 days.
We did not find any exploit available. Neither in GitHub repositories nor in the Exploit-Database.
Browse More
Continuously monitor your dependencies and get alerted when vulnerabilities like this one affect your stack.
Checkout DevGuard