Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐹
🐹 Go
Not in CISA KEV
MEDIUM severity

CVE-2026-119285 — fiber

MEDIUMFix: gofiber/fiber@1aac6f6

CVE-2026-119285 is a medium-severity (CVSS 5.9) CWE-346 vulnerability in github.com/gofiber/fiber/v2. A fix is available for github.com/gofiber/fiber/v2 — see the affected versions and patch details below.

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

Also known asGHSA-g5jq-qmqr-qrwf
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Oct 30, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
0.1%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs2th percentile — riskier than 2% of all scored CVEsHighest risk

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

CVE-2026-119285 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.

Where this sits among everything scored

Of 398,142 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

1 pkg affected
🐹github.com/gofiber/fiber/v2

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.

Description

Summary

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):

Versionhttps://evil-example.comhttp://evil-example.com
v2.52.0not allowednot allowed
v2.52.1, v2.52.2reflected, Access-Control-Allow-Credentials: truereflected, Access-Control-Allow-Credentials: true
v2.52.3 to v2.52.16not allowednot allowed

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.

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

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐹Gogithub.com/gofiber/fiber/v2≥ 2.52.1&&< 2.52.32.52.3go get github.com/gofiber/fiber/v2@v2.52.3

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/gofiber/fiber/v2, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update github.com/gofiber/fiber/v2 to 2.52.3 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-119285 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

Frequently Asked Questions

### Summary 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. #
O3 Security · Impact-Aware SCA

Is CVE-2026-119285 in your dependencies?

Find it across Go, including transitive dependencies.

CVE-2026-119285: fiber — Fixed in 2.52.3