Vulnerability · Published Sep 8, 2023 · Assigned by GitHub_M

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

Medium 5.3

In plain English

A medium-severity security flaw in fiber from gofiber. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.7% (higher than 52% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)5.3Medium
Exploit odds (30 days)0.7%top 48.4% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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 packages & fixed versions

EcosystemPackageFixed inAdvisory
Gogithub.com/gofiber/fiberno fix listedGHSA-3q5p-3558-364f
Gogithub.com/gofiber/fiber/v22.49.2GHSA-3q5p-3558-364f
Gogithub.com/gofiber/fiber/v22.49.2-0.20230906112033-b8c9ede6efa2GO-2023-2052

Affected products (as reported)

VendorProductVersions
gofiber fiber < 2.49.2

Weakness: CWE-670 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

References