Skip to content
OpenAdvisories
Medium · 5.3 CVE-2026-42554 EUVD-2026-29328GHSA-qjv7-627w-8qjvGO-2026-5585

Fiber: XSS in AutoFormat Content Negotiation

Published May 11, 2026 · Updated May 15, 2026 · Assigned by GitHub_M

Description

Fiber is a web framework for Go. Prior to 2.52.12 and 3.1.0, Cross-Site Scripting vulnerability in Go Fiber allows a remote attacker to inject arbitrary HTML/JavaScript by supplying Accept: text/html on any request whose handler passes attacker-influenced data to the AutoFormat() feature. The developer opts into content negotiation by calling AutoFormat(), but does not opt into raw HTML emission for a particular request; Fiber chooses that branch from attacker-controlled Accept. The html branch is the sole outlier in a method whose name (AutoFormat) and symmetrical structure actively telegraph "safe, format-agnostic reply." This vulnerability is fixed in 2.52.12 and 3.1.0.

Affected products

VendorProductAffectedFixed
gofiber fiber < 2.52.13, >= 3.0.0-beta.2, < 3.1.0 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
SLES for SAP 16.0 govulncheck-vulndb 0.0.20260727T201416-160000.1.1 SUSE-SU-2026:23227-1, SUSE-SU-2026:23216-1
SLES 16.0 govulncheck-vulndb 0.0.20260727T201416-160000.1.1 SUSE-SU-2026:23227-1, SUSE-SU-2026:23216-1
ReleasePackageFixed inAdvisory
openSUSE Leap 16.0 govulncheck-vulndb 0.0.20260727T201416-160000.1.1 openSUSE-SU-2026:21551-1

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling gatus 5.35.0-r11 —

Affected packages

EcosystemPackageAffectedFixedRecord
Go github.com/gofiber/fiber/v2 < 2.52.13 2.52.13 GHSA-qjv7-627w-8qjv
Go github.com/gofiber/fiber/v3 < 3.2.0 3.2.0 GHSA-qjv7-627w-8qjv

Advisories 3

References