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.
Sources and references
Verified primary and authoritative sources
-
CVE-2026-42554 CVE Program record
Publisher, destination, and source semantics verified
URL: https://www.cve.org/CVERecord?id=CVE-2026-42554
CVE Program - Official CVE Program record with source-provided CVE metadata.
-
CVE-2026-42554 NVD vulnerability detail
Publisher, destination, and source semantics verified
URL: https://nvd.nist.gov/vuln/detail/CVE-2026-42554
NIST National Vulnerability Database - Official NIST NVD detail page and source-specific vulnerability assessment.
Supplemental references
-
Mitigation or vendor reference
Unverified legacy reference
URL: https://github.com/gofiber/fiber/security/advisories/GHSA-qjv7-627w-8qjv
[email protected] - Exploit, Mitigation, Vendor Advisory
Methodology and review provenance
AI-assisted synthesis based on stored public vulnerability evidence. System validation, approval state, and publication status do not by themselves establish human review of this revision. PatchSiren helps prioritize defensive review and does not prove exposure or remediation on any system.