CVE-2026-119285: Fiber CORS middleware wildcard domain bypass

CVE-2026-119285 · Severity: medium · CVSS 5.9 · Published 2026-10-29

Fiber is a Go web framework with a CORS middleware that validates which origins can access cross-origin resources. The middleware's wildcard subdomain matching was flawed, allowing an attacker to craft a malicious origin that ends with a legitimate domain to bypass restrictions. When a user visits the attacker's page, authenticated responses from the legitimate origin can be exposed to the attacker.

Technologies: github.com/gofiber/fiber/v2 (Go). Vendors: Go, Gofiber.

Quick answers

Is CVE-2026-119285 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-119285 being exploited in the wild.
How severe is CVE-2026-119285?
Medium severity, with a CVSS score of 5.9, published 29 October 2026.
Which products and versions are affected?
github.com/gofiber/fiber/v2 (Go) >= 2.52.1, <= 2.52.2, SEMVER:introduced=2.52.1,fixed=2.52.3; Gofiber Fiber 2.52.1 through 2.52.2.
Is there a fix for CVE-2026-119285?
Yes. github.com/gofiber/fiber/v2 (Go): upgrade to 2.52.3 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-119285 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-119285?
Check whether you run github.com/gofiber/fiber/v2 (Go) or Gofiber Fiber at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • github.com/gofiber/fiber/v2 (Go): upgrade to 2.52.3 or later
    go get github.com/gofiber/fiber/v2@v2.52.3

Technical details

The validateDomain function in middleware/cors/utils.go improperly matches wildcard subdomain patterns by stripping the scheme and checking only a host suffix without requiring a dot boundary. This allows an attacker to register or control a domain like "legitimate-domain.com" to match a policy intended for "*.legitimate-domain.com". The vulnerability requires AllowCredentials to be enabled and a wildcard-subdomain AllowOrigins configuration; the attacker exploits it via reflected origin headers, exposing authenticated cross-origin responses.

Affected products

  • gofiber Fiber 2.52.1 through 2.52.2

Identifiers

  • CVE-2026-119285
  • GHSA-g5jq-qmqr-qrwf
  • GO-2026-6896

Timeline

  • 2026-10-29: disclosed

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.