# CVE-2023-41338: Vulnerability in Ctx.IsFromLocal() in gofiber

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.3
- **CVSS:** 5.3 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
- **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
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.75% (percentile 51, 2026-11-26)
- **CWE:** CWE-670
- **Aliases:** GHSA-3q5p-3558-364f, GO-2023-2052
- **Published:** 2023-09-08T13:27:21.000Z
- **Modified:** 2026-09-10T03:50:03.184Z

## 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

## 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

- Go `github.com/gofiber/fiber`: affected \<= 1.14.6; fixed no fix listed yet (osv)
- Go `github.com/gofiber/fiber/v2`: affected \< 2.49.2; fixed 2.49.2, 2.49.2-0.20230906112033-b8c9ede6efa2 (osv)
- gofiber fiber: \< 2.49.2 (cvelist)

## 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).

## Check your systems with an agent

Paste this into a coding agent:

```text
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.
```

## 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.

## References

- vendor: <https://github.com/gofiber/fiber/security/advisories/GHSA-3q5p-3558-364f>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2023-41338>
- patch: <https://github.com/gofiber/fiber/commit/b8c9ede6efa231116c4bd8bb9d5e03eac1cb76dc>
- other: <https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For>
- other: <https://docs.gofiber.io/api/ctx#isfromlocal>
- other: <https://github.com/gofiber/fiber>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-41338>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-3q5p-3558-364f> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GO-2023-2052> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2023-41338> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-41338>
