CVE-2026-42554
published 2026-05-11CVE-2026-42554: 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…
PriorityP428medium6.1CVSS 3.1
AVNACLPRNUIRSCCLILAN
EPSS
0.21%
11.5th percentile
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
6 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| github.com | gofiber_fiber_v2 | >= 0 < 2.52.13 | 2.52.13 |
| github.com | gofiber_fiber_v3 | >= 0 < 3.2.0 | 3.2.0 |
| gofiber | fiber | < 2.52.13 | 2.52.13 |
| gofiber | fiber | < 2.52.12 | 2.52.12 |
| gofiber | fiber | — | — |
| gofiber | fiber | >= 3.0.0 < 3.1.0 | 3.1.0 |
CVSS provenance
nvdv3.16.1MEDIUMCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
nvdv4.05.3MEDIUMCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
VulDB
gofiber up to 2.52.12/3.0.x AutoFormat cross site scripting (GHSA-qjv7-627w-8qjv)
vuldb·2026-05-19·CVSS 5.3
CVE-2026-42554 [MEDIUM] gofiber up to 2.52.12/3.0.x AutoFormat cross site scripting (GHSA-qjv7-627w-8qjv)
A vulnerability classified as problematic was found in gofiber fiber up to 2.52.12/3.0.x. Impacted is the function AutoFormat. The manipulation results in cross site scripting.
This vulnerability is identified as CVE-2026-42554. The attack can be executed remotely. There is not any exploit available.
Upgrading the affected component is advised.
GHSA
Fiber vulnerable to XSS in AutoFormat Content Negotiation
ghsa·2026-05-05
CVE-2026-42554 [MEDIUM] CWE-79 Fiber vulnerable to XSS in AutoFormat Content Negotiation
Fiber vulnerable to XSS in AutoFormat Content Negotiation
## Summary
**Description**
A Cross-Site Scripting (CWE-79) 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. This affects `github.com/gofiber/fiber/v3` (`DefaultRes.AutoFormat`) through version 3.1.0 and `github.com/gofiber/fiber/v2` (`Ctx.Format`) through version 2.52.12.
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. Five of the six branches of the same method already escape. `JSON`, `XML`, `MsgPack`, and `CBOR` all route thr
No detection rules found.
No public exploits indexed.
Bugzilla
CVE-2026-42554 golang-github-deepmap-oapi-codegen: Fiber: Cross-Site Scripting via Accept header manipulation [fedora-all]
bugzilla·2026-06-16·CVSS 6.1
CVE-2026-42554 [MEDIUM] CVE-2026-42554 golang-github-deepmap-oapi-codegen: Fiber: Cross-Site Scripting via Accept header manipulation [fedora-all]
CVE-2026-42554 golang-github-deepmap-oapi-codegen: Fiber: Cross-Site Scripting via Accept header manipulation [fedora-all]
Disclaimer: Community trackers are created by Red Hat Product Security team on a best effort basis. Package maintainers are required to ascertain if the flaw indeed affects their package, before starting the update process.
Bugzilla
CVE-2026-42554 golang-github-gofiber-fiber-2: Fiber: Cross-Site Scripting via Accept header manipulation [fedora-all]
bugzilla·2026-06-10·CVSS 6.1
CVE-2026-42554 [MEDIUM] CVE-2026-42554 golang-github-gofiber-fiber-2: Fiber: Cross-Site Scripting via Accept header manipulation [fedora-all]
CVE-2026-42554 golang-github-gofiber-fiber-2: Fiber: Cross-Site Scripting via Accept header manipulation [fedora-all]
Disclaimer: Community trackers are created by Red Hat Product Security team on a best effort basis. Package maintainers are required to ascertain if the flaw indeed affects their package, before starting the update process.
Bugzilla
CVE-2026-42554 github.com/gofiber/fiber: Fiber: Cross-Site Scripting via Accept header manipulation
bugzilla·2026-05-11·CVSS 6.1
CVE-2026-42554 [MEDIUM] CVE-2026-42554 github.com/gofiber/fiber: Fiber: Cross-Site Scripting via Accept header manipulation
CVE-2026-42554 github.com/gofiber/fiber: Fiber: Cross-Site Scripting via Accept header manipulation
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.
2026-05-11
Published