CVE-2026-119285

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

Medium published · updated · also known as GHSA-G5JQ-QMQR-QRWF

5.9
CVSS score out of 10 · NVD (github.com)

Description

Fiber is an Express inspired web framework written in Go. From 2.52.1 until 2.52.3, the CORS middleware's validateDomain wildcard matcher in middleware/cors/utils.go strips the scheme and checks only a host suffix without requiring a dot boundary. An application configured with a wildcard-subdomain AllowOrigins value and AllowCredentials enabled can reflect an unrelated attacker-controlled origin whose host merely ends with the configured base domain. A user who visits that origin can expose authenticated cross-origin responses to the attacker's page; empty-label origins and later comma-space parsing hardening are outside this advisory. This issue is fixed in version 2.52.3.

Affected products and versions

Product / packageEcosystem / vendorVersionsFixed inSource
github.com/gofiber/fiber/v2 go >= 2.52.1, <= 2.52.22.52.3 GitHub

References