CVE-2026-42554
Fiber: XSS in AutoFormat Content Negotiation
Also known as GHSA-qjv7-627w-8qjv, GO-2026-5585
Mitigation
- Upgrade github.com/gofiber/fiber/v3 to 3.2.0 or later.
- Upgrade github.com/gofiber/fiber/v2 to 2.52.13 or later.
Who should check
- Projects that depend on Go package github.com/gofiber/fiber/v3 (< 3.2.0)
- Projects that depend on Go package github.com/gofiber/fiber/v2 (< 2.52.13)
- Anyone running gofiber fiber < 2.52.13; >= 3.0.0-beta.2, < 3.1.0
Vulnerability facts
- Affected
- github.com/gofiber/fiber/v3 < 3.2.0; github.com/gofiber/fiber/v2 < 2.52.13
- Fixed in
- 3.2.0, 2.52.13
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 5.3 (v4.0, CNA)CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:NOpen in CVSS calculator
Show all 11 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Attack requirements: None
- Privileges required: None
- User interaction: Passive
- Confidentiality impact: None
- Integrity impact: None
- Availability impact: None
- Confidentiality impact on other systems: Low
- Integrity impact on other systems: Low
- Availability impact on other systems: None
- EPSS
- 0.31% chance of exploitation in 30 days (percentile 16, 2026-11-26)
- CWE
- CWE-79
- Modified
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 and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Go github.com/gofiber/fiber/v3 | < 3.2.0 | 3.2.0 | osv |
| Go github.com/gofiber/fiber/v2 | < 2.52.13 | 2.52.13 | osv |
| gofiber fiber | < 2.52.13; >= 3.0.0-beta.2, < 3.1.0 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-42554. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-42554.md Affected: github.com/gofiber/fiber/v3 < 3.2.0; github.com/gofiber/fiber/v2 < 2.52.13 Fixed in: 3.2.0, 2.52.13 Steps: 1. Search this machine and project for github.com/gofiber/fiber/v3 (Go), github.com/gofiber/fiber/v2 (Go), gofiber fiber: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
FAQ
Is CVE-2026-42554 being exploited?
There is no confirmed exploitation: CVE-2026-42554 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.31% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2026-42554?
Medium: CVSS 5.3 (v4.0, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.
Which versions are affected by CVE-2026-42554?
github.com/gofiber/fiber/v3 < 3.2.0; github.com/gofiber/fiber/v2 < 2.52.13.
Is there a fix for CVE-2026-42554?
Yes. Fixed in 3.2.0, 2.52.13. Upgrade github.com/gofiber/fiber/v3 to 3.2.0 or later. Upgrade github.com/gofiber/fiber/v2 to 2.52.13 or later.
How do I check if I'm affected by CVE-2026-42554?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.