Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

GHSA-gcfq-8gqf-4876: GoFiber Vulnerable to X-Real-IP Spoofing via Header.Add() in BalancerForward

0
Medium
Published: 07/02/2026 (07/02/2026, 13:50:45 UTC)
Source: GCVE Database
Product: github.com/gofiber/fiber/v3

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

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
None
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Affected software

Goghsa
github.com/gofiber/fiber/v3
Affected versions
<3.3.0
Goghsa
github.com/gofiber/fiber/v2
Affected versions
<=2.52.13

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/02/2026, 23:25:56 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses