Session Fixation Affecting github.com/gofiber/fiber/v2/middleware/session package, versions >=2.0.0 <2.52.5


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.34% (56th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-GOLANG-GITHUBCOMGOFIBERFIBERV2MIDDLEWARESESSION-7413649
  • published1 Jul 2024
  • disclosed30 Jun 2024
  • creditJason McNeil

Introduced: 30 Jun 2024

CVE-2024-38513  (opens in a new tab)
CWE-384  (opens in a new tab)

How to fix?

Upgrade github.com/gofiber/fiber/v2/middleware/session to version 2.52.5 or higher.

Overview

Affected versions of this package are vulnerable to Session Fixation through the session middleware component. This vulnerability allows users to supply their own session_id value, resulting in the creation of a session with that key. If a website relies on the mere presence of a session for security purposes, this can lead to significant security risks, including unauthorized access and session fixation attacks.

Workaround

Users who are unable to upgrade immediately can apply the following workarounds to reduce the risk:

  1. Validate Session IDs: Implement additional validation to ensure session IDs are not supplied by the user and are securely generated by the server.

  2. Session Management: Regularly rotate session IDs and enforce strict session expiration policies

CVSS Base Scores

version 4.0
version 3.1