CVE-2026-45045 Fiber: X-Real-IP Spoofing via Header.Add() in BalancerForward

Medium 5.3 Published Updated

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.

PackageAffectedFixed in
github.com/gofiber/fiber/v3 GoAll versions3.3.0
github.com/gofiber/fiber/v3 GoAll versions3.3.0
github.com/gofiber/fiber/v3 GoAll versions3.3.0
github.com/gofiber/fiber/v2 GoAll versions2.52.14
github.com/gofiber/fiber/v2 GoAll versions2.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.

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.

Is CVE-2026-45045 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free