CVE-2024-38513
Fiber Session Middleware Token Injection Vulnerability
Also known as GHSA-98j2-3j3p-fw2v, GO-2024-2959
Mitigation
- Upgrade github.com/gofiber/fiber to 2.52.5 or later.
- Upgrade github.com/gofiber/fiber/v2 to 2.52.5 or later.
- Upgrade github.com/gofiber/fiber/v2/middleware/session to 2.52.5 or later.
Who should check
- Projects that depend on Go package github.com/gofiber/fiber (< 2.52.5)
- Projects that depend on Go package github.com/gofiber/fiber/v2 (< 2.52.5)
- Projects that depend on Go package github.com/gofiber/fiber/v2/middleware/session (< 2.52.5)
- Anyone running gofiber fiber < 2.52.5
Vulnerability facts
- Affected
- github.com/gofiber/fiber < 2.52.5; github.com/gofiber/fiber/v2 < 2.52.5; github.com/gofiber/fiber/v2/middleware/session < 2.52.5
- Fixed in
- 2.52.5
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 10.0 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: None
- User interaction: None
- Scope: Changed (impact reaches other components)
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- EPSS
- 1.01% chance of exploitation in 30 days (percentile 62, 2026-11-26)
- CWE
- CWE-384
- Modified
Description
Fiber is an Express-inspired web framework written in Go A vulnerability present in versions prior to 2.52.5 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. The issue has been addressed in version 2.52.5. Users are strongly encouraged to upgrade to version 2.52.5 or higher to mitigate this vulnerability. Users who are unable to upgrade immediately can apply the following workarounds to reduce the risk: Either implement additional validation to ensure session IDs are not supplied by the user and are securely generated by the server, or regularly rotate session IDs and enforce strict session expiration policies.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Go github.com/gofiber/fiber | < 2.52.5 | 2.52.5 | osv |
| Go github.com/gofiber/fiber/v2 | < 2.52.5 | 2.52.5 | osv |
| Go github.com/gofiber/fiber/v2/middleware/session | < 2.52.5 | 2.52.5 | osv |
| gofiber fiber | < 2.52.5 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2024-38513. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2024-38513.md Affected: github.com/gofiber/fiber < 2.52.5; github.com/gofiber/fiber/v2 < 2.52.5; github.com/gofiber/fiber/v2/middleware/session < 2.52.5 Fixed in: 2.52.5 Steps: 1. Search this machine and project for github.com/gofiber/fiber (Go), github.com/gofiber/fiber/v2 (Go), github.com/gofiber/fiber/v2/middleware/session (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.
References
Vendor advisories
Patches
FAQ
Is CVE-2024-38513 being exploited?
There is no confirmed exploitation: CVE-2024-38513 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.01% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2024-38513?
Critical: CVSS 10.0 (v3.1, scored by CNA). Remote, no login needed.
Which versions are affected by CVE-2024-38513?
github.com/gofiber/fiber < 2.52.5; github.com/gofiber/fiber/v2 < 2.52.5; github.com/gofiber/fiber/v2/middleware/session < 2.52.5.
Is there a fix for CVE-2024-38513?
Yes. Fixed in 2.52.5. Upgrade github.com/gofiber/fiber to 2.52.5 or later. Upgrade github.com/gofiber/fiber/v2 to 2.52.5 or later. Upgrade github.com/gofiber/fiber/v2/middleware/session to 2.52.5 or later.
How do I check if I'm affected by CVE-2024-38513?
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.