Loading...
Skip to main content

CVE-2024-38513 — Vulnerability in github.com/gofiber/fiber — CVE...

CRITICAL

Session Middleware Token Injection Vulnerability

Published July 1, 2024Updated September 10, 2026Source: osv

Summary

A security vulnerability has been identified in the Fiber session middleware where a user can supply their own session_id value, leading to the creation of a session with that key. ## Impact The identified vulnerability is a session middleware issue in GoFiber versions 2 and above. 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. All users utilizing GoFiber's session middleware in the affected versions are impacted. ## Patches The issue has been addressed in the latest patch. Users are strongly encouraged to upgrade to version 2.52.5 or higher to mitigate this vulnerability. ## Workarounds 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. ## References For more information on session best practices: - [OWASP Session Management Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Session_Management_Cheat_Sheet.html) Users are encouraged to review these references and take immediate action to secure their applications.

Advisory Timeline

  • First published July 1, 2024 (833 days ago).
  • Last revised September 10, 2026 — 800 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Go
Update github.com/gofiber/fiber to 2.52.5 or later
go get github.com/gofiber/fiber@v2.52.5
Go
Update github.com/gofiber/fiber/v2/middleware/session to 2.52.5 or later
go get github.com/gofiber/fiber/v2/middleware/session@v2.52.5
Go
Update github.com/gofiber/fiber/v2 to 2.52.5 or later
go get github.com/gofiber/fiber/v2@v2.52.5

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (3)

Affects 1 ecosystem: go (3).

PackageEcosystemAffectedFixed In
github.com/gofiber/fiber
go
All versions2.52.5
github.com/gofiber/fiber/v2/middleware/session
go
All versions2.52.5
github.com/gofiber/fiber/v2
go
All versions2.52.5

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 10.0 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

Frequently Asked Questions

What is CVE-2024-38513?
Session Middleware Token Injection Vulnerability This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 10.0/10).
How do I check if my project is affected by CVE-2024-38513?
CVE-2024-38513 affects github.com/gofiber/fiber, github.com/gofiber/fiber/v2/middleware/session and github.com/gofiber/fiber/v2. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2024-38513 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
10.0

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-98j2-3j3p-fw2v
GO-2024-2959

Related CVEs

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies