Skip to content

CVE-2026-42554 Fiber: XSS in AutoFormat Content Negotiation

MediumCVSS 5.3 EPSS 0.21%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
Proof of concept public · automatable: no · technical impact: partial

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.

Upgrade path

2 packages: 2 fixed.

PackageAffectedFixed inStatus
gofiber github.com/gofiber/fiber < 2.52.12; = < 2.52.13; = >= 3.0.0-beta.2, < 3.1.0; >= 3.0.0, < 3.1.0 2.52.12, 3.1.0 Fixed
gofiber github.com/gofiber/fiber(Go) < 2.52.13; < 3.2.0; <= 2.52.12; <= 3.1.0 2.52.13, 3.2.0 Fixed

Affected products

ProductAffected versionsFixed in
gofiber github.com/gofiber/fiber = < 2.52.13 No fix listed
gofiber github.com/gofiber/fiber = >= 3.0.0-beta.2, < 3.1.0 No fix listed
gofiber github.com/gofiber/fiber(Go) < 3.2.0 3.2.0
gofiber github.com/gofiber/fiber(Go) < 2.52.13 2.52.13
gofiber github.com/gofiber/fiber(Go) <= 3.1.0 No fix listed
gofiber github.com/gofiber/fiber(Go) <= 2.52.12 No fix listed
gofiber github.com/gofiber/fiber < 2.52.12 2.52.12
gofiber github.com/gofiber/fiber >= 3.0.0, < 3.1.0 3.1.0

References