CVE-2026-119285

CVE-2026-119285 is a medium-severity security vulnerability in github.com/gofiber/fiber/v2 (go), affecting versions >= 2.52.1, <= 2.52.2. It is fixed in 2.52.3.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

Fiber: CORS wildcard origins matched without a dot boundary, allowing credentialed cross-origin reads

In v2.52.1 and v2.52.2 the CORS middleware matched a wildcard origin such as https://*.example.com by suffix only, without a dot boundary and without comparing the scheme. Any origin whose host ends with the base domain, for example https://evil-example.com or http://notexample.com, was reflected in Access-Control-Allow-Origin, together with Access-Control-Allow-Credentials: true when AllowCredentials is enabled.

v2.52.3 replaced the matcher (#2915) and is not affected. The report was filed against v2.52.15, where the dot boundary holds; see "Other versions" below.

Details

v2.52.1 introduced validateDomain in middleware/cors/utils.go (f0cd3b44, part of the fix for GHSA-fmg4-x8pw-hjhg). It strips scheme and port from both sides and then checks only the suffix, with trimmedPattern = "example.com", so the character before the suffix is never checked:

if strings.HasPrefix(normalizedPattern, "*.") {
	trimmedPattern := normalizedPattern[2:]
	if strings.HasSuffix(normalizedDomain, trimmedPattern) {
		if normalizedDomain != trimmedPattern {
			if strings.TrimSuffix(normalizedDomain, trimmedPattern) != "" {
				return true
			}
		}
	}
}

v2.52.3 (1aac6f61, #2915) replaced it with a scheme-aware prefix/suffix split that keeps the leading dot in the suffix (.example.com).

Proof of concept

app := fiber.New()
app.Use(cors.New(cors.Config{
	AllowOrigins:     "https://*.example.com",
	AllowCredentials: true,
}))
app.Get("/", func(c *fiber.Ctx) error { return c.SendString("secret") })

Request with Origin: https://evil-example.com, as a GET and as a preflight (OPTIONS with Access-Control-Request-Method: GET):

Version https://evil-example.com http://evil-example.com
v2.52.0 not allowed not allowed
v2.52.1, v2.52.2 reflected, Access-Control-Allow-Credentials: true reflected, Access-Control-Allow-Credentials: true
v2.52.3 to v2.52.16 not allowed not allowed

Other versions

All v2 releases before v2.52.16 also accepted origins with empty labels (https://.example.com, https://a..example.com), and v2.52.3 to v2.52.15 mis-parsed a wildcard entry after a comma and a space ("https://a.com, https://*.example.com"). No registrable domain produces such an origin, so these are hardening rather than part of this advisory. They are fixed in v2.52.16 (#4792).

Impact

An app that configures a wildcard-subdomain AllowOrigins with AllowCredentials: true lets any page on a domain that ends with the base domain (for example notexample.com for *.example.com) read authenticated responses cross-origin. Fixed in v2.52.3; upgrade to the latest v2 release.

CVE-2026-119285 has a CVSS score of 5.9 (Medium). The vector is network-reachable, no privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (2.52.3); upgrading removes the vulnerable code path.

Affected versions

github.com/gofiber/fiber/v2 (>= 2.52.1, <= 2.52.2)

Security releases

github.com/gofiber/fiber/v2 → 2.52.3 (go)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Upgrade github.com/gofiber/fiber/v2 to 2.52.3 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2026-119285? CVE-2026-119285 is a medium-severity security vulnerability in github.com/gofiber/fiber/v2 (go), affecting versions >= 2.52.1, <= 2.52.2. It is fixed in 2.52.3.
  2. How severe is CVE-2026-119285? CVE-2026-119285 has a CVSS score of 5.9 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of github.com/gofiber/fiber/v2 are affected by CVE-2026-119285? github.com/gofiber/fiber/v2 (go) versions >= 2.52.1, <= 2.52.2 is affected.
  4. Is there a fix for CVE-2026-119285? Yes. CVE-2026-119285 is fixed in 2.52.3. Upgrade to this version or later.
  5. Is CVE-2026-119285 exploitable, and should I be worried? Whether CVE-2026-119285 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2026-119285 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2026-119285? Upgrade github.com/gofiber/fiber/v2 to 2.52.3 or later.

Other vulnerabilities in github.com/gofiber/fiber/v2

Stop the waste.
Protect your environment with Kodem.