---
title: "CVE-2024-38513: Session Middleware Token Injection Vulnerability"
url: https://erroneo.us/security/cve/CVE-2024-38513/
description: "CVE-2024-38513 (github.com/gofiber/fiber (Go)): Fiber is an Express-inspired web framework written in Go A vulnerability present in versions prior to 2.52.5…"
type: vulnerability-record
section: "Security Digest"
date_published: 2024-07-01
date_modified: 2024-08-02
publisher: erroneo.us
author: erroneo.us Security Desk
cve: "CVE-2024-38513"
kev: false
cvss: 10
epss: 0.00692
license: All rights reserved. Quote with attribution and a link.
---

# CVE-2024-38513: Session Middleware Token Injection Vulnerability

**Signal:** Critical and remotely reachable. No known exploitation yet, but it is network-reachable without credentials. (Computed from CISA KEV, EPSS and CVSS; not an editorial verdict.)

## Should you act?

- No confirmed exploitation. It is not in CISA’s KEV catalog and CISA’s SSVC assessment records no known exploitation. That can change quickly after a public write-up; re-check if you are affected.
- EPSS 0.7% , percentile 52: FIRST’s model estimates a 0.7% chance of exploitation activity in the next 30 days, higher than 52% of all scored CVEs (moderate). EPSS is a probability, not a verdict.
- Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
- Only applies if your dependency tree includes github.com/gofiber/fiber (Go) <= 2.52.4, fixed in 2.52.5 ; github.com/gofiber/fiber/v2 (Go) <= 2.52.4, fixed in 2.52.5 ; github.com/gofiber/fiber/v2/middleware/session (Go) <= 2.52.4, fixed in 2.52.5 . Check your lockfile, including transitive dependencies.

## What it is

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 sessionid 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 packages

- Go `github.com/gofiber/fiber` <= 2.52.4 → fixed: 2.52.5
- Go `github.com/gofiber/fiber/v2` <= 2.52.4 → fixed: 2.52.5
- Go `github.com/gofiber/fiber/v2/middleware/session` <= 2.52.4 → fixed: 2.52.5

## Affected products (CVE record)

- gofiber fiber: < 2.52.5

## Severity

- GitHub_M CVSS 3.1: 10 `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H`
- GitHub CVSS 3.1: 10.0 `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H`

## Exploitation

- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation none , automatable yes , technical impact total .
- FIRST EPSS (model of 2026-10-21): 0.69% probability of exploitation activity in the next 30 days; percentile 52.

## Sources

- [GitHub Advisory GHSA-98j2-3j3p-fw2v](https://github.com/advisories/GHSA-98j2-3j3p-fw2v)
- [CVE.org record CVE-2024-38513](https://www.cve.org/CVERecord?id=CVE-2024-38513)
- [NVD entry CVE-2024-38513](https://nvd.nist.gov/vuln/detail/CVE-2024-38513)
- [github.com](https://github.com/gofiber/fiber/security/advisories/GHSA-98j2-3j3p-fw2v)
- [github.com](https://github.com/gofiber/fiber/commit/66a881441b27322a331f1b526cf1eb6b3358a4d8)
- [github.com](https://github.com/gofiber/fiber/commit/7926e5bf4da03e54f62d27d53229d35b264cba8e)

---
Source page: https://erroneo.us/security/cve/CVE-2024-38513/ · Security Digest: https://erroneo.us/security/ · More: https://erroneo.us/llms.txt
