CVE-2021-29480
JSON

4.4medium

Default client side session signing key is highly predictable

Severity
4.4medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.26% (higher than 19% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-2cc5-23r7-vc4v

Description

Ratpack is a toolkit for creating web applications. In versions prior to 1.9.0, the client side session module uses the application startup time as the signing key by default. This means that if an attacker can determine this time, and if encryption is not also used (which is recommended, but is not on by default), the session data could be tampered with by someone with the ability to write cookies. The default configuration is unsuitable for production use as an application restart renders all sessions invalid and is not multi-host compatible, but its use is not actively prevented. As of Ratpack 1.9.0, the default value is a securely randomly generated value, generated at application startup time. As a workaround, supply an alternative signing key, as per the documentation's recommendation.

Affected

Product or packageVersionsReported by
ratpack ratpack< 1.9.0CVE List
io.ratpack:ratpack-session (Maven)before 1.9.0GitHub Advisory Database
ratpack_project ratpackbefore 1.9.0NVD

All scores

GitHub_M4.4medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
GitHub4.4medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
NVD3.1low CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N
NVD3.5low CVSS:2.0AV:N/AC:M/Au:S/C:N/I:P/A:N

Classification

What each source says

CVE List

Ratpack is a toolkit for creating web applications. In versions prior to 1.9.0, the client side session module uses the application startup time as the signing key by default. This means that if an attacker can determine this time, and if encryption is not also used (which is recommended, but is not on by default), the session data could be tampered with by someone with the ability to write cookies. The default configuration is unsuitable for production use as an application restart renders all sessions invalid and is not multi-host compatible, but its use is not actively prevented. As of Ratpack 1.9.0, the default value is a securely randomly generated value, generated at application startup time. As a workaround, supply an alternative signing key, as per the documentation's recommendation.

GitHub Advisory Database
Impact

The client side session module uses the application startup time as the signing key by default. This means that if an attacker can determine this time, and if encryption is not also used (which is recommended, but is not on by default), the session data could be tampered with by someone with the ability to write cookies.

The default configuration is unsuitable for production use as an application restart renders all sessions invalid and is not multi-host compatible, but its use is not actively prevented.

Vulnerability Location

https://github.com/ratpack/ratpack/blob/29434f7ac6fd4b36a4495429b70f4c8163100332/ratpack-session/src/main/java/ratpack/session/clientside/ClientSideSessionConfig.java#L29

Patches

As of Ratpack 1.9.0 the default value is a securely randomly generated value, generated at application startup time.

Workarounds

Supply an alternative signing key, as per the documentation's recommendation.

NVD (es)

Ratpack es un kit de herramientas para crear aplicaciones web. En las versiones anteriores a 1.9.0, el módulo de sesión del lado del cliente usa por defecto la hora de inicio de la aplicación como clave de firma. Esto significa que si un atacante puede determinar esta hora, y si no se usa también el cifrado (que se recomienda, pero no está activado por defecto), los datos de la sesión podrían ser manipulados por alguien con la capacidad de escribir cookies. La configuración por defecto es inapropiada para su uso en producción, ya que un reinicio de la aplicación invalida todas las sesiones y no es compatible con varios hosts, pero no se impide activamente su uso. A partir de Ratpack versión 1.9.0, el valor por defecto es un valor generado aleatoriamente de forma segura, generado en el momento de iniciar la aplicación. Como solución, proporcione una clave de firma alternativa, según la recomendación de la documentación

References

Sources

SourceRecordLicence
CVE ListCVE-2021-29480 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-2cc5-23r7-vc4v changed 2026-07-08CC-BY-4.0
NVDCVE-2021-29480 changed 2026-06-17Public domain