LowGO-2023-2115CVE-2023-45128GHSA-94w9-97p3-p368

CSRF token reuse vulnerability in github.com/gofiber/fiber/v2

Published 24 Oct 2023 · Updated 20 May 2024

Is your project on an affected github.com/gofiber/fiber/v2?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Go apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected package

Affected
<2.50.0
Fixed in
2.50.0
Update to the fixed version for your release line, for example:go get github.com/gofiber/fiber/v2@v2.50.0

Details

A cross-site request forgery vulnerability in this package can allow an attacker to inject arbitrary values and forge malicious requests on behalf of a user. The attacker may inject arbitrary values without any authentication, or perform various malicious actions on behalf of an authenticated user, potentially compromising the security and integrity of the application.

The vulnerability is caused by improper validation and enforcement of CSRF tokens within the application. For 'safe' methods, the token is extracted from the cookie and saved to storage without further validation or sanitization. In addition, the CSRF token is validated against tokens in storage but not associated with a session, nor by using a Double Submit Cookie Method, allowing for token reuse.

Is GO-2023-2115 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected github.com/gofiber/fiber/v2, and gives you the command that fixes it.

More advisories for github.com/gofiber/fiber/v2

  • LowCVE-2026-119285Fiber: CORS wildcard origins matched without a dot boundary, allowing credentialed cross-origin reads in github.com/gofiber/fiber · 5 Nov 2026
  • MediumCVE-2026-119285Fiber: CORS wildcard origins matched without a dot boundary, allowing credentialed cross-origin reads · 30 Oct 2026
  • LowCVE-2026-42554Fiber vulnerable to XSS in AutoFormat Content Negotiation in github.com/gofiber/fiber · 24 Jul 2026
  • MediumCVE-2026-45045GoFiber Vulnerable to X-Real-IP Spoofing via Header.Add() in BalancerForward · 2 Jul 2026
  • MediumCVE-2026-42554Fiber vulnerable to XSS in AutoFormat Content Negotiation · 5 May 2026
  • LowCVE-2026-25882Fiber has a Denial of Service Vulnerability via Route Parameter Overflow in github.com/gofiber/fiber · 26 Feb 2026
All 23 advisories for github.com/gofiber/fiber/v2

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.