PatchSiren cyber security CVE debrief
CVE-2026-42554 Gofiber CVE debrief
A Cross-Site Scripting (XSS) vulnerability in the Go Fiber web framework allows remote attackers to inject arbitrary HTML/JavaScript by supplying an `Accept: text/html` header on requests whose handlers pass attacker-influenced data to the `AutoFormat()` feature. The vulnerability exists because `AutoFormat()` performs content negotiation based on the attacker-controlled `Accept` header, and when `text/html` is selected, it emits raw HTML without additional sanitization—even though the developer did not explicitly opt into HTML output. The method's name and symmetrical structure suggest safe, format-agnostic behavior, making the HTML branch an unexpected outlier. This affects Fiber versions prior to 2.52.12 and 3.0.0 through 3.0.x prior to 3.1.0. The vulnerability was published on 2026-05-11 and last modified on 2026-05-18. No known exploitation in ransomware campaigns has been reported.
- Vendor
- Gofiber
- Product
- Fiber
- CVSS
- MEDIUM 5.3
- CISA KEV
- Not listed in stored evidence
- Original CVE published
- 2026-05-11
- Original CVE updated
- 2026-05-18
- Advisory published
- 2026-05-11
- Advisory updated
- 2026-05-18
Who should care
Organizations running Go applications built with Fiber framework versions prior to 2.52.12 or 3.0.0-3.0.x, particularly those using AutoFormat() with user-influenced data. Development teams practicing defense-in-depth for content negotiation handlers. Security teams reviewing Go web application attack surface.
Technical summary
The Go Fiber framework's `AutoFormat()` method selects response formats based on the HTTP `Accept` header. When `text/html` is requested, the method emits raw HTML without escaping, creating an XSS vector when attacker-influenced data reaches the method. The vulnerability is notable because developers calling `AutoFormat()` reasonably expect format-agnostic, safe behavior based on the method name and symmetrical handling of other formats (JSON, XML, etc.). The HTML branch breaks this expectation by emitting unsanitized content.
Defensive priority
medium
Recommended defensive actions
- Upgrade Fiber to version 2.52.12 (for 2.x series) or 3.1.0 (for 3.x series) or later
- Review application handlers that use AutoFormat() to ensure they do not pass untrusted user input directly
- Consider implementing additional output encoding when user-influenced data may reach AutoFormat()
- Monitor application logs for requests with Accept: text/html headers to handlers using AutoFormat()
- If immediate patching is not possible, implement WAF rules to sanitize or block suspicious Accept headers for routes using AutoFormat()
Evidence notes
Official vendor advisory confirms the vulnerability mechanism and affected versions. NVD CPE data confirms version ranges: all versions before 2.52.12, and 3.0.0 through versions before 3.1.0. CVSS 4.0 vector indicates network attack vector, low attack complexity, no privileges required, and user interaction required.
Official resources
-
CVE-2026-42554 CVE record
CVE.org
-
CVE-2026-42554 NVD detail
NVD
-
Source item URL
nvd_modified
-
Mitigation or vendor reference
[email protected] - Exploit, Mitigation, Vendor Advisory
2026-05-11