{"id":"GHSA-3q5p-3558-364f","revision":"5db841acbca34ec2b82b24e3f759b19b","records":[{"revision":"5db841acbca34ec2b82b24e3f759b19b","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-3q5p-3558-364f","aliases":["CVE-2023-41338","GO-2023-2052"],"title":"Fiber unauthorized access vulnerability in `ctx.IsFromLocal()`","description":"### Impact\nThis vulnerability can be categorized as a security misconfiguration. It impacts users of our project who rely on the [ctx.IsFromLocal()](https://docs.gofiber.io/api/ctx#isfromlocal) method to restrict access to localhost requests. If exploited, it could allow unauthorized access to resources intended only for localhost.\n\nIn it's implementation it uses c.IPs():\n\n```go\n// IPs returns a string slice of IP addresses specified in the X-Forwarded-For request header.\n// When IP validation is enabled, only valid IPs are returned.\nfunc (c *Ctx) IPs() []string {\n    return c.extractIPsFromHeader(HeaderXForwardedFor)\n}\n```\n\nThereby, setting `X-Forwarded-For: 127.0.0.1` in a request from a foreign host, will result in true for [ctx.IsFromLocal()](https://docs.gofiber.io/api/ctx#isfromlocal) \n\n### Patches\nThis issue has been patched in `v2.49.2` with commit [b8c9ede6efa231116c4bd8bb9d5e03eac1cb76dc](https://github.com/gofiber/fiber/commit/b8c9ede6efa231116c4bd8bb9d5e03eac1cb76dc)\n\n### Workarounds\nCurrently, there are no known workarounds to remediate this vulnerability without upgrading to the patched version. We strongly advise users to apply the patch as soon as it is released.\n\n### References\nFor further information and context regarding this security issue, please refer to the following resources:\n\n- [Mozilla Developer Network - X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)\n\n","state":0,"publishedAt":"2023-09-08T13:27:21+00:00","modifiedAt":"2026-09-10T03:50:03.1848786+00:00","affected":[{"ecosystem":"Go","name":"github.com/gofiber/fiber","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"last_affected","version":"1.14.6"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"Go","name":"github.com/gofiber/fiber/v2","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"2.49.2"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/gofiber/fiber/security/advisories/GHSA-3q5p-3558-364f","https://nvd.nist.gov/vuln/detail/CVE-2023-41338","https://github.com/gofiber/fiber/commit/b8c9ede6efa231116c4bd8bb9d5e03eac1cb76dc","https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For","https://docs.gofiber.io/api/ctx#isfromlocal","https://github.com/gofiber/fiber"],"sourceUrl":"https://github.com/advisories/GHSA-3q5p-3558-364f","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-3q5p-3558-364f","identifiers":["GHSA-3q5p-3558-364f","CVE-2023-41338","GO-2023-2052"]},"retained":false,"historicalAffected":[]}],"coverage":[]}