Skip to main content
← All vulnerabilities
CVE-2026-42554GHSA-QJV7-627W-8QJVGO-2026-5585

Fiber: XSS in AutoFormat Content Negotiation

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 2.52.13, 3.1.0, 3.2.0
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: poc
  • Automatable: no
  • Technical impact: partial

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: no · Technical impact: partial

  3. Record last updated

Affected versions

  • gofiber fiber

    fixed in 2.52.13; From 3.0.0-beta.2 · fixed in 3.1.0

  • github.com/gofiber/fiber/v3Go

    fixed in 3.2.0

  • github.com/gofiber/fiber/v2Go

    fixed in 2.52.13

References 1

GitHub · gofiber/fiber