CVE-2026-45045Medium· 5.3▾ SunlitGoFiber Vulnerable to X-Real-IP Spoofing via Header.Add() in BalancerForward
▾ Sunlit zone — Low / medium · no exploitation signal
impact 29.2 · likelihood 0.1 · exploitation 0
Need a working PoC? Pro members can cast a request and our team develops one — it lands right here.
Exploit-prediction probability, daily snapshots since Jul 9.
Disclosure to exploitation, from the record and what we observed since indexing it.
Disclosed via GHSA
0.5%
0.5% → 0.5%
The BalancerForward proxy helper in GoFiber uses Header.Add() instead of Header.Set() when injecting the X-Real-IP header. This appends the real client IP as a second header value rather than replacing any attacker-supplied value. Upstream servers that read the first X-Real-IP header (nginx, Express, most HTTP servers) use the attacker's spoofed IP for logging, rate limiting, and access control.
File: middleware/proxy/proxy.go, lines 270-285
func BalancerForward(servers []string, clients ...*fasthttp.Client) fiber.Handler {
r := &roundrobin{
current: 0,
pool: servers,
}
return func(c fiber.Ctx) error {
server := r.get()
if !strings.HasPrefix(server, "http") {
server = "http://" + server
}
c.Request().Header.Add("X-Real-IP", c.IP()) // line 282: Add, not Set
return Do(c, server+c.OriginalURL(), clients...)
}
}
X-Real-IP: 10.0.0.1 (spoofed internal IP)BalancerForward handler executes at line 282c.Request().Header.Add("X-Real-IP", c.IP()) APPENDS the real IP as a second headerX-Real-IP: 10.0.0.1 AND X-Real-IP: <real-attacker-ip>10.0.0.1 for all IP-dependent logic10.0.0.0/8) can be bypassedReplace Header.Add() with Header.Set() at line 282:
c.Request().Header.Set("X-Real-IP", c.IP())
Header.Set() replaces any existing header value, ensuring only the real client IP is forwarded.
github.com/gofiber/fiber/v3 <= 3.2.0github.com/gofiber/fiber/v2 <= 2.52.13Upgrade to a patched release:
github.com/gofiber/fiber/v3 3.3.0Connected by shared product, vendor, weakness, or advisory.
CVE-2026-42554MediumFiber vulnerable to XSS in AutoFormat Content Negotiation
CVE-2026-30246Medium· 6.5Fiber's cache middleware default key generator ignores query string, causing response mix-up across distinct query parameters
CVE-2026-44332Medium· 5.3GoFiber Vulnerable to Username Enumeration via Timing Oracle in BasicAuth Default Authorizer
CVE-2025-66630CriticalFiber has an insecure fallback in utils.UUIDv4() / utils.UUID() — predictable / zero‑UUID on crypto/rand failure
CVE-2024-22199Critical· 9.3Django Template Engine Vulnerable to XSS
CVE-2023-41338Medium· 5.3Fiber unauthorized access vulnerability in `ctx.IsFromLocal()`