CVE-2024-38513
JSON

10.0critical

Fiber Session Middleware Token Injection Vulnerability

Severity
10.0critical CVSS:3.1 by GitHub_M
Exploit likelihood
1.01% (higher than 62% of CVEs)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-98j2-3j3p-fw2vGO-2024-2959

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

Product or packageVersionsReported by
gofiber fiber< 2.52.5, before 2.52.5CVE List, NVD
github.com/gofiber/fiber (Go)before 2.52.5, all versionsGitHub Advisory Database, Go Vulnerability Database
github.com/gofiber/fiber/v2 (Go)before 2.52.5GitHub Advisory Database, Go Vulnerability Database
github.com/gofiber/fiber/v2/middleware/session (Go)before 2.52.5GitHub Advisory Database

All scores

GitHub_M10.0critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
GitHub10.0critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-384

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total.

What each source says

CVE List

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.

GitHub Advisory Database

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:

Users are encouraged to review these references and take immediate action to secure their applications.

Go Vulnerability Database

Session Middleware Token Injection Vulnerability in github.com/gofiber/fiber

NVD (es)

Fiber es un framework web inspirado en Express escrito en Go. Una vulnerabilidad presente en versiones anteriores a la 2.52.5 es un problema de middleware de sesión en las versiones 2 y superiores de GoFiber. Esta vulnerabilidad permite a los usuarios proporcionar su propio valor session_id, lo que da como resultado la creación de una sesión con esa clave. Si un sitio web depende de la mera presencia de una sesión por motivos de seguridad, esto puede generar importantes riesgos de seguridad, incluido el acceso no autorizado y ataques de fijación de sesión. Todos los usuarios que utilizan el middleware de sesión de GoFiber en las versiones afectadas se ven afectados. El problema se solucionó en la versión 2.52.5. Se recomienda encarecidamente a los usuarios que actualicen a la versión 2.52.5 o superior para mitigar esta vulnerabilidad. Los usuarios que no puedan actualizar inmediatamente pueden aplicar las siguientes soluciones para reducir el riesgo: implementar una validación adicional para garantizar que los ID de sesión no sean proporcionados por el usuario y sean generados de forma segura por el servidor, o rotar periódicamente los ID de sesión y aplicar políticas estrictas de caducidad de sesión.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-38513 changed 2024-08-02CVE Terms of Use
GitHub Advisory DatabaseGHSA-98j2-3j3p-fw2v changed 2026-09-10CC-BY-4.0
Go Vulnerability DatabaseGO-2024-2959 changed 2026-03-03CC-BY-4.0
NVDCVE-2024-38513 changed 2026-06-17Public domain