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.
Published: 2026-07-08
Score: 5.3 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The BalancerForward helper in the Fiber framework injects the client IP into the X‑Real‑IP header using Header.Add instead of Header.Set. This behavior allows an attacker to include a malicious X‑Real‑IP value that becomes the first entry in the header when the request is forwarded to an upstream server. The forwarded header can then be used by upstream applications for logging, rate limiting, or IP‑based access control, leading to false attribution of requests, bypass of rate limits, or evasion of IP‑restricted access.

Affected Systems

The vulnerability affects the Go Fiber framework provided by the gofiber vendor, specifically versions older than 3.3.0 and 2.52.14. Versions 3.3.0 and 2.52.14 onward use Header.Set to correctly set the X‑Real‑IP header and are not affected.

Risk and Exploitability

The assessed CVSS score of 5.3 places the flaw in the moderate range, while the EPSS score of <1% indicates a very low probability of exploitation. Because it is triggered by an arbitrary X‑Real‑ remote and does not require local privileges. If an attacker succeeds, they can spoof the client IP seen by upstream services, potentially causing misattributionbased rate limits, or bypass of IP‑based access controls. The flaw is not listed in, suggesting no publicly known exploits.

Generated by OpenCVE AI on July 26, 2026 at 17:22 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to Fiber 3.3.0 or 2.52.14, which uses Header.Set to set X‑Real‑IP correctly.
  • If an upgrade cannot be performed immediately, modify the BalancerForward middleware to call Header.Set instead of Header.Add so that only one client IP value is forwarded.
  • Reconfigure downstream services that use X‑Real‑IP for access control or rate limiting to validate the header value, for example by accepting only the first address or by performing additional validation.

Generated by OpenCVE AI on July 26, 2026 at 17:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-gcfq-8gqf-4876 GoFiber Vulnerable to X-Real-IP Spoofing via Header.Add() in BalancerForward
History

Thu, 09 Jul 2026 14:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 08 Jul 2026 20:45:00 +0000

Type Values Removed Values Added
First Time appeared Gofiber
Gofiber fiber
Vendors & Products Gofiber
Gofiber fiber

Wed, 08 Jul 2026 19:45:00 +0000

Type Values Removed Values Added
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.
Title Fiber: X-Real-IP Spoofing via Header.Add() in BalancerForward
Weaknesses CWE-290
References
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-09T13:20:08.367Z

Reserved: 2026-05-08T18:07:27.341Z

Link: CVE-2026-45045

cve-icon Vulnrichment

Updated: 2026-07-09T13:19:46.171Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-26T17:30:17Z

Weaknesses
  • CWE-290

    Authentication Bypass by Spoofing