{"id":"CVE-2023-41338","published":"2023-09-08T18:17:18Z","modified":"2024-09-26T14:05:03Z","title":"Vulnerability in Ctx.IsFromLocal() in gofiber","vendor":"gofiber","product":"fiber","tier":"tail","description":{"text":"Fiber is an Express inspired web framework built in the go language. Versions of gofiber prior to 2.49.2 did not properly restrict access to localhost. This issue impacts users of our project who rely on the `ctx.IsFromLocal` method to restrict access to localhost requests. If exploited, it could allow unauthorized access to resources intended only for localhost. Setting `X-Forwarded-For: 127.0.0.1` in a request from a foreign host, will result in true for `ctx.IsFromLocal`. Access is limited to the scope of the affected process. This issue has been patched in version `2.49.2` with commit `b8c9ede6`. Users are advised to upgrade. There are no known workarounds to remediate this vulnerability without upgrading to the patched version. ","provenance":"source","from":"CVE.org"},"cvss":{"score":5.3,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00655,"percentile":0.52316,"provenance":"source"},"cwes":[{"id":"CWE-670","name":"Always-Incorrect Control Flow Implementation"}],"references":[{"url":"https://github.com/gofiber/fiber/security/advisories/GHSA-3q5p-3558-364f","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/gofiber/fiber/commit/b8c9ede6efa231116c4bd8bb9d5e03eac1cb76dc","tags":["x_refsource_MISC"]},{"url":"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For","tags":["x_refsource_MISC"]},{"url":"https://docs.gofiber.io/api/ctx#isfromlocal","tags":["x_refsource_MISC"]}],"priority":{"score":14.2,"factors":[{"name":"EPSS percentile","points":10.46},{"name":"CVSS severity","points":3.71}]},"vendorSlug":"gofiber","affectedVersions":[{"vendor":"gofiber","product":"fiber","versions":["< 2.49.2"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2024-09-26T13:59:21.650864Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Go","package":"github.com/gofiber/fiber","vulnerableRanges":["<=1.14.6"],"patched":[],"from":["GHSA-3q5p-3558-364f"],"provenance":"source"},{"ecosystem":"Go","package":"github.com/gofiber/fiber/v2","vulnerableRanges":["<2.49.2","<2.49.2-0.20230906112033-b8c9ede6efa2"],"patched":["2.49.2","2.49.2-0.20230906112033-b8c9ede6efa2"],"from":["GHSA-3q5p-3558-364f","GO-2023-2052"],"provenance":"source"}],"summary":{"text":"In the gofiber framework's fiber product, the Ctx.IsFromLocal() method is flawed in that it does not properly restrict access to localhost requests in versions prior to 2.49.2. An attacker on the network, without authentication or user interaction, can send a request from a foreign host with the X-Forwarded-For header set to 127.0.0.1, causing IsFromLocal to return true and gaining access to resources intended only for localhost, limited to the scope of the affected process.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:40:52Z"},"euvd":{"id":"EUVD-2023-2407","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-gofiber-fiber-cve-2020-15111","parents":[{"from":"CVE-2020-15111","to":"CVE-2023-41338","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["ctx.go"],"commits":["https://github.com/gofiber/fiber/commit/f698b5d5066cfe594102ae252cd58a1fe57cf56f","https://github.com/gofiber/fiber/commit/b8c9ede6efa231116c4bd8bb9d5e03eac1cb76dc"],"basis":"rarely changed file"}]}],"children":[{"from":"CVE-2023-41338","to":"CVE-2026-53624","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["ctx.go"],"commits":["https://github.com/gofiber/fiber/commit/b8c9ede6efa231116c4bd8bb9d5e03eac1cb76dc","https://github.com/gofiber/fiber/commit/04dd4e7754f61768fddccacc79057e416f13e6bf"],"basis":"rarely changed file"}]}],"packageHistory":[{"cve":"CVE-2018-20744","published":"2019-01-28","fixed":"2.43.0","kev":false},{"cve":"CVE-2023-41338","published":"2023-09-08","fixed":"2.49.2-0.20230906112033-b8c9ede6efa2","kev":false},{"cve":"CVE-2023-45128","published":"2023-10-16","fixed":"2.50.0","kev":false,"link":{"from":"CVE-2023-41338","to":"CVE-2023-45128","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Go:github.com/gofiber/fiber/v2","fromFixed":"2.49.2-0.20230906112033-b8c9ede6efa2","toFixed":"2.50.0","daysApart":38}]}},{"cve":"CVE-2023-45141","published":"2023-10-16","fixed":"2.50.0","kev":false,"link":{"from":"CVE-2023-41338","to":"CVE-2023-45141","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Go:github.com/gofiber/fiber/v2","fromFixed":"2.49.2-0.20230906112033-b8c9ede6efa2","toFixed":"2.50.0","daysApart":38}]}},{"cve":"CVE-2024-25124","published":"2024-02-21","fixed":"2.52.1","kev":false}],"package":"Go:github.com/gofiber/fiber/v2"}}