CVE-2026-42554: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in gofiber fiber
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.
AI Analysis
Technical Summary
The Go Fiber web framework contains a Cross-Site Scripting vulnerability (CWE-79) in its AutoFormat() feature. When a request includes an Accept: text/html header, and the handler passes attacker-influenced data to AutoFormat(), Fiber may emit raw HTML without proper neutralization. This occurs because Fiber chooses the HTML response branch based on the attacker-controlled Accept header, despite the developer not explicitly opting into raw HTML emission. This vulnerability affects Fiber versions before 2.52.12 and between 3.0.0-beta.2 and before 3.1.0. It allows remote attackers to inject arbitrary HTML or JavaScript, potentially leading to XSS attacks. The issue is resolved in versions 2.52.12 and 3.1.0.
Potential Impact
Successful exploitation allows remote attackers to inject arbitrary HTML or JavaScript code into responses generated by the Fiber framework when using the AutoFormat() feature with attacker-controlled Accept headers. This can lead to Cross-Site Scripting attacks, potentially impacting users by executing malicious scripts in their browsers. The CVSS score of 5.3 reflects a medium severity with network attack vector, low complexity, no privileges required, and user interaction needed.
Mitigation Recommendations
A fix for this vulnerability is available in Fiber versions 2.52.12 and 3.1.0. Users should upgrade to at least these versions to remediate the issue. Since no official vendor advisory content is provided, patch status is inferred from the description stating the vulnerability is fixed in these versions. No additional mitigation steps are indicated.
CVE-2026-42554: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in gofiber fiber
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.
CVSS v4.0
Score 5.3medium
Affected software
pkg:golang/github.com/gofiber/fiberRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The Go Fiber web framework contains a Cross-Site Scripting vulnerability (CWE-79) in its AutoFormat() feature. When a request includes an Accept: text/html header, and the handler passes attacker-influenced data to AutoFormat(), Fiber may emit raw HTML without proper neutralization. This occurs because Fiber chooses the HTML response branch based on the attacker-controlled Accept header, despite the developer not explicitly opting into raw HTML emission. This vulnerability affects Fiber versions before 2.52.12 and between 3.0.0-beta.2 and before 3.1.0. It allows remote attackers to inject arbitrary HTML or JavaScript, potentially leading to XSS attacks. The issue is resolved in versions 2.52.12 and 3.1.0.
Potential Impact
Successful exploitation allows remote attackers to inject arbitrary HTML or JavaScript code into responses generated by the Fiber framework when using the AutoFormat() feature with attacker-controlled Accept headers. This can lead to Cross-Site Scripting attacks, potentially impacting users by executing malicious scripts in their browsers. The CVSS score of 5.3 reflects a medium severity with network attack vector, low complexity, no privileges required, and user interaction needed.
Mitigation Recommendations
A fix for this vulnerability is available in Fiber versions 2.52.12 and 3.1.0. Users should upgrade to at least these versions to remediate the issue. Since no official vendor advisory content is provided, patch status is inferred from the description stating the vulnerability is fixed in these versions. No additional mitigation steps are indicated.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-28T16:56:50.191Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a028743cbff5d86108b5065
Added to database: 05/12/2026, 01:49:55 UTC
Last enriched: 05/19/2026, 09:08:54 UTC
Last updated: 07/31/2026, 19:22:58 UTC
Views: 71
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.