CVE-2026-42554
MEDIUM 5.3CVSS 4.0Fiber vulnerable to XSS in AutoFormat Content Negotiation
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.
- Published
- 11 May 2026
- Last modified
- 26 Oct 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-79
- Also known as
- GHSA-qjv7-627w-8qjvGO-2026-5585
- Sources
- NVDJSONOSV GHSA-qjv7-627w-8qjvJSONOSV GO-2026-5585JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 4.0 | MEDIUM 5.3 | 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/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 |
| OSV | GitHub | CVSS 4.0 | 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 | |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | gofiber | fibercpe:2.3:a:gofiber:fiber:*:*:*:*:*:go:*:* |
< 2.52.12 | 2.52.12 |
| NVD | gofiber | fibercpe:2.3:a:gofiber:fiber:*:*:*:*:*:go:*:* |
>= 3.0.0, < 3.1.0 | 3.1.0 |
| OSV | 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 |
References
- https://github.com/gofiber/fiber/security/advisories/GHSA-qjv7-627w-8qjv · Exploit, Mitigation, Vendor Advisory, WEB, ADVISORY
- https://nvd.nist.gov/vuln/detail/CVE-2026-42554 · ADVISORY
- https://github.com/gofiber/fiber · PACKAGE
History
- 25 Nov 2026 21:02 UTC · NVD: first stored (published 11 May 2026)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 24 Jul 2026)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 5 May 2026)