# CVE-2026-42554: Fiber: XSS in AutoFormat Content Negotiation

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.3
- **CVSS:** 5.3 (v4.0, CNA) `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`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Attack requirements: None; Privileges required: None; User interaction: Passive; Confidentiality impact: None; Integrity impact: None; Availability impact: None; Confidentiality impact on other systems: Low; Integrity impact on other systems: Low; Availability impact on other systems: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.31% (percentile 16, 2026-11-28)
- **CWE:** CWE-79
- **Aliases:** GHSA-qjv7-627w-8qjv, GO-2026-5585
- **Published:** 2026-05-05T20:13:23.000Z
- **Modified:** 2026-10-26T18:10:00.173Z

## Who should check

- Projects that depend on Go package github.com/gofiber/fiber/v3 (\< 3.2.0)
- Projects that depend on Go package github.com/gofiber/fiber/v2 (\< 2.52.13)
- Anyone running gofiber fiber \< 2.52.13; \>= 3.0.0-beta.2, \< 3.1.0

## 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.

## Affected and fixed versions

- Go `github.com/gofiber/fiber/v3`: affected \< 3.2.0; fixed 3.2.0 (osv)
- Go `github.com/gofiber/fiber/v2`: affected \< 2.52.13; fixed 2.52.13 (osv)
- gofiber fiber: \< 2.52.13; \>= 3.0.0-beta.2, \< 3.1.0 (cvelist)

## Mitigation

- Upgrade github.com/gofiber/fiber/v3 to 3.2.0 or later.
- Upgrade github.com/gofiber/fiber/v2 to 2.52.13 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-42554. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-42554.md
Affected: github.com/gofiber/fiber/v3 < 3.2.0; github.com/gofiber/fiber/v2 < 2.52.13
Fixed in: 3.2.0, 2.52.13

Steps:
1. Search this machine and project for github.com/gofiber/fiber/v3 (Go), github.com/gofiber/fiber/v2 (Go), gofiber fiber: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-42554 being exploited?

There is no confirmed exploitation: CVE-2026-42554 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.31% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-42554?

Medium: CVSS 5.3 (v4.0, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2026-42554?

github.com/gofiber/fiber/v3 \< 3.2.0; github.com/gofiber/fiber/v2 \< 2.52.13.

### Is there a fix for CVE-2026-42554?

Yes. Fixed in 3.2.0, 2.52.13. Upgrade github.com/gofiber/fiber/v3 to 3.2.0 or later. Upgrade github.com/gofiber/fiber/v2 to 2.52.13 or later.

### How do I check if I'm affected by CVE-2026-42554?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/gofiber/fiber/security/advisories/GHSA-qjv7-627w-8qjv>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2026-42554>
- other: <https://github.com/gofiber/fiber>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-42554>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-qjv7-627w-8qjv> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GO-2026-5585> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2026-42554> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-42554>
