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 made by Snyk's Security Team

    Threat Intelligence

    EPSS
    0.04% (11th 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 ID SNYK-GOLANG-GITHUBCOMGOFIBERFIBERV2MIDDLEWARESESSION-7413649
  • published 1 Jul 2024
  • disclosed 30 Jun 2024
  • credit Jason McNeil

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 Scores

version 4.0
version 3.1
Expand this section

Snyk

Recommended
6.1 medium
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    Low
  • Attack Requirements (AT)
    Present
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    Passive
  • Confidentiality (VC)
    High
  • Integrity (VI)
    Low
  • Availability (VA)
    Low
  • Confidentiality (SC)
    None
  • Integrity (SI)
    None
  • Availability (SA)
    None