CVE-2026-45045 Fiber: X-Real-IP Spoofing via Header.Add() in BalancerForward
Attackers can spoof X-Real-IP headers in Fiber proxy middleware, bypassing upstream rate limiting and access controls.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-45045?
CVE-2026-45045 is a medium-severity vulnerability in gofiber fiber, published on 8 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Fiber is an Express inspired web framework written in Go. Prior to 3.3.0 and 2.52.14, the BalancerForward proxy helper in middleware/proxy/proxy.go uses Header.Add() instead of Header.Set() when injecting X-Real-IP, allowing an attacker-supplied first X-Real-IP value to be forwarded to upstream servers for logging, rate limiting, and access control. This issue is fixed in version 3.3.0 and 2.52.14.
Weakness: CWE-290
Which versions are affected by CVE-2026-45045?
5 open source packages ship an affected version, including github.com/gofiber/fiber/v3 and github.com/gofiber/fiber/v2. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
github.com/gofiber/fiber/v3 Go | All versions | 3.3.0 |
github.com/gofiber/fiber/v3 Go | All versions | 3.3.0 |
github.com/gofiber/fiber/v3 Go | All versions | 3.3.0 |
github.com/gofiber/fiber/v2 Go | All versions | 2.52.14 |
github.com/gofiber/fiber/v2 Go | All versions | 2.52.14 |
Products include Gofiber Fiber.
How do I fix CVE-2026-45045?
Upgrade github.com/gofiber/fiber/v3 to 3.3.0 or later.
Is CVE-2026-45045 being exploited?
There is no known exploitation of CVE-2026-45045 in the wild and no public exploit code.
Other vulnerabilities in gofiber fiber
- CVE-2024-38513 Fiber Session Middleware Token Injection Vulnerability
- CVE-2023-45128 CSRF Token Reuse Vulnerability in fiber
- CVE-2024-25124 Fiber has Insecure CORS Configuration, Allowing Wildcard Origin with Credentials
- CVE-2025-66630 Fiber insecurely fallsback in utils.UUIDv4() / utils.UUID() — predictable / zero‑UUID on crypto/rand failure
- CVE-2025-54801 Fiber Susceptible to Crash via `BodyParser` Due to Unvalidated Large Slice Index in Decoder
Sources
Also known as GHSA-gcfq-8gqf-4876, GO-2026-5887, MINI-5g7v-9g4p-6349, MINI-6r5m-9fvh-3mx8, MINI-7w8h-jr24-h956, MINI-8vvp-fqcg-3cqh and 1 more.