{"id":"GO-2026-5887","revision":null,"records":[{"revision":"4efe1eb3d70f458389c208bdaa5319e3","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-45045","aliases":[],"title":"Fiber: X-Real-IP Spoofing via Header.Add() in BalancerForward","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.","state":0,"publishedAt":"2026-07-08T19:26:26.58+00:00","modifiedAt":"2026-07-09T13:20:08.367+00:00","affected":[{"ecosystem":"Vendor product","name":"fiber","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"gofiber\",\n                    \"product\": \"fiber\",\n                    \"versions\": [\n                        {\n                            \"version\": \">= 3.0.0-beta.2, < 3.3.0\",\n                            \"status\": \"affected\"\n                        },\n                        {\n                            \"version\": \"< 2.52.14\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3,"severity":"MEDIUM"}],"references":["https://github.com/gofiber/fiber/security/advisories/GHSA-gcfq-8gqf-4876","https://github.com/gofiber/fiber/pull/4260","https://github.com/gofiber/fiber/pull/4495","https://github.com/gofiber/fiber/commit/1403cc8292da3220e9316960b4030cc722a0f396","https://github.com/gofiber/fiber/commit/33c9501288ab47a429c8b5e701493f0c3c0af37d","https://github.com/gofiber/fiber/releases/tag/v2.52.14","https://github.com/gofiber/fiber/releases/tag/v3.3.0"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-45045","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-45045","identifiers":["CVE-2026-45045"]},"retained":false,"historicalAffected":[]},{"revision":"99c92a3dd824427aa0c7535b167cf084","observedAt":"2026-11-07T13:22:49.328+00:00","statement":{"source":"euvd","id":"EUVD-2026-42351","aliases":["CVE-2026-45045","GHSA-gcfq-8gqf-4876"],"title":"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-sup…","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.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3,"severity":null}],"references":["https://github.com/gofiber/fiber/security/advisories/GHSA-gcfq-8gqf-4876","https://github.com/gofiber/fiber/pull/4260","https://github.com/gofiber/fiber/pull/4495","https://github.com/gofiber/fiber/commit/1403cc8292da3220e9316960b4030cc722a0f396","https://github.com/gofiber/fiber/commit/33c9501288ab47a429c8b5e701493f0c3c0af37d","https://github.com/gofiber/fiber/releases/tag/v2.52.14","https://github.com/gofiber/fiber/releases/tag/v3.3.0"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-42351","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Jul 8, 2026, 7:26:26 PM","dateUpdated":"Jul 9, 2026, 1:20:08 PM"},"relatedAdvisories":[],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2026-42351","identifiers":["EUVD-2026-42351","CVE-2026-45045","GHSA-gcfq-8gqf-4876"]},"retained":false,"historicalAffected":[]},{"revision":"42ba563616f143d084c4843122939a6f","observedAt":"2026-10-27T11:12:23.45+00:00","statement":{"source":"nvd","id":"CVE-2026-45045","aliases":[],"title":"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-sup…","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.","state":0,"publishedAt":"2026-07-08T20:16:50.06+00:00","modifiedAt":"2026-10-25T17:10:00.197+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3,"severity":"MEDIUM"}],"references":["https://github.com/gofiber/fiber/commit/1403cc8292da3220e9316960b4030cc722a0f396","https://github.com/gofiber/fiber/commit/33c9501288ab47a429c8b5e701493f0c3c0af37d","https://github.com/gofiber/fiber/pull/4260","https://github.com/gofiber/fiber/pull/4495","https://github.com/gofiber/fiber/releases/tag/v2.52.14","https://github.com/gofiber/fiber/releases/tag/v3.3.0","https://github.com/gofiber/fiber/security/advisories/GHSA-gcfq-8gqf-4876"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-45045","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Analyzed","weaknesses":["CWE-290"],"productCriteria":["cpe:2.3:a:gofiber:fiber:*:*:*:*:*:go:*:*"],"sourceDates":{"published":"2026-07-08T20:16:50.060","lastModified":"2026-10-25T17:10:00.197"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-45045","identifiers":["CVE-2026-45045"]},"retained":false,"historicalAffected":[]},{"revision":"c7ff7ea5e6604758b3ffeb0d44664ebd","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-gcfq-8gqf-4876","aliases":["CVE-2026-45045","GO-2026-5887"],"title":"GoFiber Vulnerable to X-Real-IP Spoofing via Header.Add() in BalancerForward","description":"## Summary\n\nThe `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.\n\n## Vulnerable Code\n\n**File:** `middleware/proxy/proxy.go`, lines 270-285\n\n```go\nfunc BalancerForward(servers []string, clients ...*fasthttp.Client) fiber.Handler {\n    r := &roundrobin{\n        current: 0,\n        pool:    servers,\n    }\n    return func(c fiber.Ctx) error {\n        server := r.get()\n        if !strings.HasPrefix(server, \"http\") {\n            server = \"http://\" + server\n        }\n        c.Request().Header.Add(\"X-Real-IP\", c.IP())   // line 282: Add, not Set\n        return Do(c, server+c.OriginalURL(), clients...)\n    }\n}\n```\n\n## Data Flow\n\n1. Attacker sends request with `X-Real-IP: 10.0.0.1` (spoofed internal IP)\n2. `BalancerForward` handler executes at line 282\n3. `c.Request().Header.Add(\"X-Real-IP\", c.IP())` APPENDS the real IP as a second header\n4. Upstream server receives: `X-Real-IP: 10.0.0.1` AND `X-Real-IP: <real-attacker-ip>`\n5. Most HTTP servers (nginx, Node.js, Apache) read the FIRST value\n6. Upstream uses `10.0.0.1` for all IP-dependent logic\n\n## Impact\n\n- **Rate limit bypass:** IP-based rate limiting at the upstream uses the spoofed IP, allowing unlimited requests\n- **IP ACL bypass:** Internal IP allowlists (e.g., admin panels restricted to `10.0.0.0/8`) can be bypassed\n- **Audit log poisoning:** Security logs record the spoofed IP, making incident investigation unreliable\n- **Geolocation bypass:** IP-based geofencing or region restrictions are circumvented\n\n## Fix\n\nReplace `Header.Add()` with `Header.Set()` at line 282:\n\n```go\nc.Request().Header.Set(\"X-Real-IP\", c.IP())\n```\n\n`Header.Set()` replaces any existing header value, ensuring only the real client IP is forwarded.","state":0,"publishedAt":"2026-07-02T13:50:45+00:00","modifiedAt":"2026-09-10T03:50:52.0542005+00:00","affected":[{"ecosystem":"Go","name":"github.com/gofiber/fiber/v3","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"3.3.0"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"Go","name":"github.com/gofiber/fiber/v2","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"2.52.14"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/gofiber/fiber/security/advisories/GHSA-gcfq-8gqf-4876","https://nvd.nist.gov/vuln/detail/CVE-2026-45045","https://github.com/gofiber/fiber/pull/4260","https://github.com/gofiber/fiber/pull/4495","https://github.com/gofiber/fiber/commit/1403cc8292da3220e9316960b4030cc722a0f396","https://github.com/gofiber/fiber/commit/33c9501288ab47a429c8b5e701493f0c3c0af37d","https://github.com/gofiber/fiber","https://github.com/gofiber/fiber/releases/tag/v2.52.14","https://github.com/gofiber/fiber/releases/tag/v3.3.0"],"sourceUrl":"https://github.com/advisories/GHSA-gcfq-8gqf-4876","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-gcfq-8gqf-4876","identifiers":["GHSA-gcfq-8gqf-4876","CVE-2026-45045","GO-2026-5887"]},"retained":false,"historicalAffected":[]},{"revision":"e6f82924c4a94542b77b8ef2092ba3c0","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GO-2026-5887","aliases":["CVE-2026-45045","GHSA-gcfq-8gqf-4876"],"title":"GoFiber Vulnerable to X-Real-IP Spoofing via Header.Add() in BalancerForward in github.com/gofiber/fiber","description":"GoFiber Vulnerable to X-Real-IP Spoofing via Header.Add() in BalancerForward in github.com/gofiber/fiber","state":0,"publishedAt":"2026-07-24T18:35:55+00:00","modifiedAt":"2026-07-24T19:00:26.8664657+00:00","affected":[{"ecosystem":"Go","name":"github.com/gofiber/fiber/v3","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"3.3.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://github.com/gofiber/fiber/security/advisories/GHSA-gcfq-8gqf-4876","https://github.com/gofiber/fiber/pull/4260"],"sourceUrl":"https://osv.dev/vulnerability/GO-2026-5887","license":"OSV · upstream source license applies","key":"osv:GO-2026-5887","identifiers":["GO-2026-5887","CVE-2026-45045","GHSA-gcfq-8gqf-4876"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-07T21:52:16.7895348+00:00","complete":true,"records":1769,"lastAttemptAt":"2026-11-07T21:52:16.7895348+00:00","lastSuccessAt":"2026-11-07T21:52:17.018923+00:00","error":null,"lastVerifiedAt":"2026-11-07T21:52:17.0189237+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-bb5c9d5a08063ef076042e33dd72a7d0ffa4c4487efdcf3106e29ba55ec2ad57-5978693a555a2fac0feee4f8e1cdc5e013b9a91b16046d4e34ae63a3d3db8d19","complete":true,"records":420947,"lastAttemptAt":"2026-11-07T21:52:16.4606105+00:00","lastSuccessAt":"2026-11-07T21:52:16.3995215+00:00","error":null,"lastVerifiedAt":"2026-11-07T21:52:16.4606105+00:00","snapshotPublishedAt":"2026-11-07T21:18:20+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-1bd82ad418de4527aa7b6720e3a83e0a","complete":false,"records":13633,"lastAttemptAt":"2026-11-07T22:01:23.1803729+00:00","lastSuccessAt":"2026-11-07T22:01:23.2565235+00:00","error":null,"lastVerifiedAt":"2026-11-07T22:01:23.2565235+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-07T21:52:16.7895348+00:00","complete":true,"records":1096,"lastAttemptAt":"2026-11-07T21:52:16.7895348+00:00","lastSuccessAt":"2026-11-07T21:52:17.0199092+00:00","error":null,"lastVerifiedAt":"2026-11-07T21:52:17.0199095+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-2b22c2d15f834007aa54c93f73b8deaf","complete":true,"records":13645,"lastAttemptAt":"2026-11-07T21:52:42.2590883+00:00","lastSuccessAt":"2026-11-07T21:52:42.255+00:00","error":null,"lastVerifiedAt":"2026-11-07T21:52:42.255+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13685,"expectedIdentifiers":13685,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-0eb4d6dde62dffacd040ad992d4fd5a65cd7d0dc5f5f4cfa8b41967fc6f9ca5f","complete":true,"records":9914,"lastAttemptAt":"2026-11-07T21:52:16.7352005+00:00","lastSuccessAt":"2026-11-06T20:10:36.6450506+00:00","error":null,"lastVerifiedAt":"2026-11-07T21:52:16.7352005+00:00","snapshotPublishedAt":"2026-11-06T20:02:57+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-fde804134ecdda0ddd5ff5c26ee1fff5a6fa659311f7ef2e51c6ad54964db0e2","complete":true,"records":1971,"lastAttemptAt":"2026-11-07T21:52:16.5087916+00:00","lastSuccessAt":"2026-11-06T19:03:17.0399903+00:00","error":null,"lastVerifiedAt":"2026-11-07T21:52:16.5087916+00:00","snapshotPublishedAt":"2026-11-06T18:17:57+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-335633e78a15c9cde10a6025895b5617717087fb945489ae7e15d377bacf34a9","complete":true,"records":3055,"lastAttemptAt":"2026-11-07T21:52:16.7531721+00:00","lastSuccessAt":"2026-11-06T16:03:00.7615789+00:00","error":null,"lastVerifiedAt":"2026-11-07T21:52:16.7531721+00:00","snapshotPublishedAt":"2026-11-06T16:02:48+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-40ad6183a951565ace1520a9b4d631e1d0bfb1d4bf7c5574c375032559f3ff53","complete":true,"records":231292,"lastAttemptAt":"2026-11-07T21:52:16.6283313+00:00","lastSuccessAt":"2026-11-07T10:29:00.4821259+00:00","error":null,"lastVerifiedAt":"2026-11-07T21:52:16.6283313+00:00","snapshotPublishedAt":"2026-11-07T09:32:47+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}