GHSA-gcfq-8gqf-4876: GoFiber Vulnerable to X-Real-IP Spoofing via Header.Add() in BalancerForward
The GoFiber framework's BalancerForward proxy helper improperly uses Header.Add() instead of Header.Set() when forwarding the X-Real-IP header. This causes the real client IP to be appended as a second header value rather than replacing any existing attacker-supplied X-Real-IP header. Upstream servers typically read the first X-Real-IP header, which can be spoofed by an attacker. This vulnerability affects versions prior to 3.3.0 and up to 2.52.13 inclusive.
AI Analysis
Technical Summary
In GoFiber versions <3.3.0 and <=2.52.13, the BalancerForward proxy helper uses the Header.Add() method to insert the X-Real-IP header, appending the real client IP to any existing X-Real-IP header instead of replacing it. Because many upstream HTTP servers (e.g., nginx, Express) use the first X-Real-IP header value for IP-based logic, an attacker can supply a spoofed X-Real-IP header that is used preferentially. This leads to IP spoofing in logging, rate limiting, access control, and geolocation enforcement. The fix is to replace Header.Add() with Header.Set() to ensure only the real client IP is forwarded.
Potential Impact
This vulnerability allows attackers to spoof the X-Real-IP header, causing upstream servers to use the attacker-supplied IP for critical functions. This can bypass IP-based rate limiting, IP allowlists (such as internal network restrictions), and geolocation controls. Additionally, audit logs may record false IP addresses, complicating incident response and forensic analysis. There is no direct confidentiality or availability impact reported.
Mitigation Recommendations
A fix is available by replacing the Header.Add() call with Header.Set() in the BalancerForward proxy helper to ensure the X-Real-IP header is overwritten rather than appended. Users should upgrade to GoFiber version 3.3.0 or later, or any version later than 2.52.13 where this issue is resolved. Until patched, users should avoid relying on the X-Real-IP header from BalancerForward or implement additional validation upstream.
GHSA-gcfq-8gqf-4876: GoFiber Vulnerable to X-Real-IP Spoofing via Header.Add() in BalancerForward
Description
The GoFiber framework's BalancerForward proxy helper improperly uses Header.Add() instead of Header.Set() when forwarding the X-Real-IP header. This causes the real client IP to be appended as a second header value rather than replacing any existing attacker-supplied X-Real-IP header. Upstream servers typically read the first X-Real-IP header, which can be spoofed by an attacker. This vulnerability affects versions prior to 3.3.0 and up to 2.52.13 inclusive.
CVSS v3.1
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
In GoFiber versions <3.3.0 and <=2.52.13, the BalancerForward proxy helper uses the Header.Add() method to insert the X-Real-IP header, appending the real client IP to any existing X-Real-IP header instead of replacing it. Because many upstream HTTP servers (e.g., nginx, Express) use the first X-Real-IP header value for IP-based logic, an attacker can supply a spoofed X-Real-IP header that is used preferentially. This leads to IP spoofing in logging, rate limiting, access control, and geolocation enforcement. The fix is to replace Header.Add() with Header.Set() to ensure only the real client IP is forwarded.
Potential Impact
This vulnerability allows attackers to spoof the X-Real-IP header, causing upstream servers to use the attacker-supplied IP for critical functions. This can bypass IP-based rate limiting, IP allowlists (such as internal network restrictions), and geolocation controls. Additionally, audit logs may record false IP addresses, complicating incident response and forensic analysis. There is no direct confidentiality or availability impact reported.
Mitigation Recommendations
A fix is available by replacing the Header.Add() call with Header.Set() in the BalancerForward proxy helper to ensure the X-Real-IP header is overwritten rather than appended. Users should upgrade to GoFiber version 3.3.0 or later, or any version later than 2.52.13 where this issue is resolved. Until patched, users should avoid relying on the X-Real-IP header from BalancerForward or implement additional validation upstream.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-gcfq-8gqf-4876
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-45045"]
- Ecosystems
- ["Go"]
- Database Specific Severity
- MODERATE
- Cvss Version
- 3.1
Threat ID: 6a46ece327e9c79719440e5f
Added to database: 07/02/2026, 22:57:39 UTC
Last enriched: 07/02/2026, 23:25:56 UTC
Last updated: 07/03/2026, 03:28:00 UTC
Views: 6
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.