All vulnerabilities

Go

CVE-2026-119285

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

Severity
Medium 5.9
Published
30 Oct 2026
Last changed
5 Nov 2026
Added to UpHeron
23 Nov 2026
Fixed in
2.52.3
Exploit chance
0.1% in the next 30 daysHigher than 2% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
Origin validation error (CWE-346)Permissive cross-domain policy (CWE-942)
Attack
Over the network · Only under certain conditions · No login needed · Needs someone to click or open something
Attacker can
Read data · Change some data
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:L/A:N
Also known as
GHSA-g5jq-qmqr-qrwf, GO-2026-6896
Sources
OSV.dev and GitHub

Description

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.

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:

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

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
github.com/gofiber/fiber/v2Go · osv:Go:github.com/gofiber/fiber/v2
  • From 2.52.1 before 2.52.3

About github.com/gofiber/fiber/v2

This is the only vulnerability in github.com/gofiber/fiber/v2 in our list.

References