CVE-2026-45045: GoFiber Vulnerable to X-Real-IP Spoofing via Header.Add() in BalancerForward
(updated )
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.
References
- github.com/advisories/GHSA-gcfq-8gqf-4876
- github.com/gofiber/fiber/commit/1403cc8292da3220e9316960b4030cc722a0f396
- github.com/gofiber/fiber/commit/33c9501288ab47a429c8b5e701493f0c3c0af37d
- github.com/gofiber/fiber/pull/4260
- github.com/gofiber/fiber/pull/4495
- github.com/gofiber/fiber/releases/tag/v2.52.14
- github.com/gofiber/fiber/releases/tag/v3.3.0
- github.com/gofiber/fiber/security/advisories/GHSA-gcfq-8gqf-4876
- nvd.nist.gov/vuln/detail/CVE-2026-45045
Code Behaviors & Features
Detect and mitigate CVE-2026-45045 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →