2.6low
User session is still usable after logout in graylog2-server
- Severity
- 2.6low CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.48% (higher than 43% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-3fqm-frhg-7c85
Description
Graylog is a free and open log management platform. In a multi-node Graylog cluster, after a user has explicitly logged out, a user session may still be used for API requests until it has reached its original expiry time. Each node maintains an in-memory cache of user sessions. Upon a cache-miss, the session is loaded from the database. After that, the node operates solely on the cached session. Modifications to sessions will update the cached version as well as the session persisted in the database. However, each node maintains their isolated version of the session. When the user logs out, the session is removed from the node-local cache and deleted from the database. The other nodes will however still use the cached session. These nodes will only fail to accept the session id if they intent to update the session in the database. They will then notice that the session is gone. This is true for most API requests originating from user interaction with the Graylog UI because these will lead to an update of the session's "last access" timestamp. If the session update is however prevented by setting the `X-Graylog-No-Session-Extension:true` header in the request, the node will consider the (cached) session valid until the session is expired according to its timeout setting. No session identifiers are leaked. After a user has logged out, the UI shows the login screen again, which gives the user the impression that their session is not valid anymore. However, if the session becomes compromised later, it can still be used to perform API requests against the Graylog cluster. The time frame for this is limited to the configured session lifetime, starting from the time when the user logged out. This issue has been addressed in versions 5.0.9 and 5.1.3. Users are advised to upgrade.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Graylog2 graylog2-server | >= 5.1.0, < 5.1.3, >= 1.0.0, < 5.0.9 | CVE List |
| org.graylog2:graylog2-server (Maven) | from 1.0 before 5.0.9, from 5.1.0 before 5.1.3 | GitHub Advisory Database |
| graylog graylog | from 1.0.0 before 5.0.9, from 5.1.0 before 5.1.3 | NVD |
All scores
| GitHub_M | 2.6low CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:N/A:N |
| GitHub | 2.6low CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:N/A:N |
| NVD | 3.1low CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
Graylog is a free and open log management platform. In a multi-node Graylog cluster, after a user has explicitly logged out, a user session may still be used for API requests until it has reached its original expiry time. Each node maintains an in-memory cache of user sessions. Upon a cache-miss, the session is loaded from the database. After that, the node operates solely on the cached session. Modifications to sessions will update the cached version as well as the session persisted in the database. However, each node maintains their isolated version of the session. When the user logs out, the session is removed from the node-local cache and deleted from the database. The other nodes will however still use the cached session. These nodes will only fail to accept the session id if they intent to update the session in the database. They will then notice that the session is gone. This is true for most API requests originating from user interaction with the Graylog UI because these will lead to an update of the session's "last access" timestamp. If the session update is however prevented by setting the `X-Graylog-No-Session-Extension:true` header in the request, the node will consider the (cached) session valid until the session is expired according to its timeout setting. No session identifiers are leaked. After a user has logged out, the UI shows the login screen again, which gives the user the impression that their session is not valid anymore. However, if the session becomes compromised later, it can still be used to perform API requests against the Graylog cluster. The time frame for this is limited to the configured session lifetime, starting from the time when the user logged out. This issue has been addressed in versions 5.0.9 and 5.1.3. Users are advised to upgrade.
GitHub Advisory Database
Summary
In a multi-node Graylog cluster, after a user has explicitly logged out, a user session may still be used for API requests until it has reached its original expiry time.
Details
Each node maintains an in-memory cache of user sessions. Upon a cache-miss, the session is loaded from the database. After that, the node operates solely on the cached session. Modifications to sessions will update the cached version as well as the session persisted in the database. However, each node maintains their isolated version of the session.
When the user logs out, the session is removed from the node-local cache and deleted from the database. The other nodes will however still use the cached session.
These nodes will only fail to accept the session id if they intent to update the session in the database. They will then notice that the session is gone. This is true for most API requests originating from user interaction with the Graylog UI because these will lead to an update of the session's "last access" timestamp.
If the session update is however prevented by setting the X-Graylog-No-Session-Extension:true header in the request, the node will consider the (cached) session valid until the session is expired according to its timeout setting.
PoC
In a 2-node setup, with both nodes behind a load balancer:
- Log in
- Extract the session ID from the cookie
- Log out and close the browser
- Perform the following API request repeatedly with curl (with
<session-id>replaced with the session id from step 2 and<lb-host>replaced with the hostname of your load balancer):curl -I -H X-Graylog-No-Session-Extension:true https://<session-id>:session@<lb-host>/api/system/cluster/nodes - Notice that the request is sometimes rejected, but sometimes succeeds
Impact
No session identifiers are leaked.
After a user has logged out, the UI shows the login screen again, which gives the user the impression that their session is not valid anymore. However, if the session becomes compromised later, it can still be used to perform API requests against the Graylog cluster. The time frame for this is limited to the configured session lifetime, starting from the time when the user logged out.
NVD (es)
Graylog es una plataforma de gestión de logs gratuita y de código abierto. En un clúster Graylog de múltiples nodos, después de que un usuario ha cerrado sesión explícitamente, una sesión de usuario aún puede ser utilizada para solicitudes de API hasta que haya alcanzado su tiempo de caducidad original. Cada nodo mantiene una caché en memoria de sesiones de usuario. Ante un fallo de caché, la sesión se carga desde la base de datos. Después de eso, el nodo opera únicamente con la sesión en caché. Las modificaciones a las sesiones actualizarán la versión en caché, así como la sesión persistida en la base de datos. Sin embargo, cada nodo mantiene su versión aislada de la sesión. Cuando el usuario cierra sesión, la sesión se elimina de la caché local del nodo y se borra de la base de datos. Los otros nodos, sin embargo, seguirán utilizando la sesión en caché. Estos nodos solo fallarán en aceptar el ID de la sesión si intentan actualizar la sesión en la base de datos. Entonces notarán que la sesión ha desaparecido. Esto es cierto para la mayoría de las solicitudes de API que se originan de la interacción del usuario con la interfaz de usuario de Graylog porque estas conducirán a una actualización de la marca de tiempo de 'último acceso' de la sesión. Si la actualización de la sesión se evita, sin embargo, configurando el encabezado X-Graylog-No-Session-Extension:true en la solicitud, el nodo considerará la sesión (en caché) válida hasta que la sesión expire según su configuración de tiempo de espera. No se filtran identificadores de sesión. Después de que un usuario ha cerrado sesión, la interfaz de usuario muestra la pantalla de inicio de sesión nuevamente, lo que da al usuario la impresión de que su sesión ya no es válida. Sin embargo, si la sesión se ve comprometida más tarde, aún puede ser utilizada para realizar solicitudes de API contra el clúster Graylog. El plazo para esto está limitado a la vida útil de la sesión configurada, a partir del momento en que el usuario cerró sesión. Este problema ha sido abordado en las versiones 5.0.9 y 5.1.3. Se aconseja a los usuarios que actualicen.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2023-41041 changed 2024-10-01 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-3fqm-frhg-7c85 changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2023-41041 changed 2026-06-17 | Public domain |