Quick answers
- Is CVE-2026-42554 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2026-42554 being exploited in the wild.
- How severe is CVE-2026-42554?
- Medium severity, with a CVSS score of 4, published 11 May 2026.
- Which products and versions are affected?
- Fiber <= 2.52.12, <= 2.52.12, <= 3.1.0; github.com/gofiber/fiber/v2 (Go) <= 2.52.12, SEMVER:introduced=0,fixed=2.52.13; github.com/gofiber/fiber/v3 (Go) <= 3.1.0, SEMVER:introduced=0,fixed=3.2.0.
- Is there a fix for CVE-2026-42554?
- Yes. github.com/gofiber/fiber/v2 (Go): upgrade to 2.52.13 or later; github.com/gofiber/fiber/v3 (Go): upgrade to 3.2.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2026-42554 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2026-42554?
- Check whether you run Fiber, github.com/gofiber/fiber/v2 (Go) or github.com/gofiber/fiber/v3 (Go) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- github.com/gofiber/fiber/v2 (Go): upgrade to 2.52.13 or later
go get github.com/gofiber/fiber/v2@v2.52.13 - github.com/gofiber/fiber/v3 (Go): upgrade to 3.2.0 or later
go get github.com/gofiber/fiber/v3@v3.2.0
Technical details
A Cross-Site Scripting (XSS) vulnerability exists in Go Fiber's `AutoFormat()` (v3) and `Format()` (v2) methods. The vulnerability occurs because the framework's content negotiation logic includes an 'html' branch that wraps stringified input data in `<p>` tags without performing HTML entity encoding. While other formats like JSON and XML use safe encoders, the HTML branch performs direct string concatenation. An attacker can trigger this branch by providing a `text/html` value in the `Accept` request header. If the data passed to these methods contains attacker-controlled input, arbitrary HTML or JavaScript can be executed in the context of the victim's browser. The issue is fixed in versions 2.52.12 and 3.1.0 by implementing proper HTML escaping.
Affected products
- gofiber fiber <= 2.52.12, <= 3.1.0
Identifiers
- CVE-2026-42554
- GHSA-qjv7-627w-8qjv
- GO-2026-5585
Timeline
- 2026-04-25: advisory: GitHub Security Advisory published
- 2026-05-11: disclosed: CVE-2026-42554 published to NVD