CVE-2023-41338
Vulnerability in Ctx.IsFromLocal() in gofiber
Also known as GHSA-3q5p-3558-364f, GO-2023-2052
Mitigation
- Upgrade github.com/gofiber/fiber/v2 to one of 2.49.2, 2.49.2-0.20230906112033-b8c9ede6efa2 (or later in the same release line).
Who should check
- Projects that depend on Go package github.com/gofiber/fiber (<= 1.14.6)
- Projects that depend on Go package github.com/gofiber/fiber/v2 (< 2.49.2)
- Anyone running gofiber fiber < 2.49.2
Vulnerability facts
- Affected
- github.com/gofiber/fiber <= 1.14.6; github.com/gofiber/fiber/v2 < 2.49.2
- Fixed in
- 2.49.2, 2.49.2-0.20230906112033-b8c9ede6efa2
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 5.3 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: None
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: Low
- Integrity impact: None
- Availability impact: None
- EPSS
- 0.75% chance of exploitation in 30 days (percentile 51, 2026-11-26)
- CWE
- CWE-670
- Modified
Description
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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Go github.com/gofiber/fiber | <= 1.14.6 | — | osv |
| Go github.com/gofiber/fiber/v2 | < 2.49.2 | 2.49.2, 2.49.2-0.20230906112033-b8c9ede6efa2 | osv |
| gofiber fiber | < 2.49.2 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2023-41338. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2023-41338.md Affected: github.com/gofiber/fiber <= 1.14.6; github.com/gofiber/fiber/v2 < 2.49.2 Fixed in: 2.49.2, 2.49.2-0.20230906112033-b8c9ede6efa2 Steps: 1. Search this machine and project for github.com/gofiber/fiber (Go), github.com/gofiber/fiber/v2 (Go), gofiber fiber: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
FAQ
Is CVE-2023-41338 being exploited?
There is no confirmed exploitation: CVE-2023-41338 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.75% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2023-41338?
Medium: CVSS 5.3 (v3.1, scored by CNA). Remote, no login needed.
Which versions are affected by CVE-2023-41338?
github.com/gofiber/fiber <= 1.14.6; github.com/gofiber/fiber/v2 < 2.49.2.
Is there a fix for CVE-2023-41338?
Yes. Fixed in 2.49.2, 2.49.2-0.20230906112033-b8c9ede6efa2. Upgrade github.com/gofiber/fiber/v2 to one of 2.49.2, 2.49.2-0.20230906112033-b8c9ede6efa2 (or later in the same release line).
How do I check if I'm affected by CVE-2023-41338?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.