{"id":"CVE-2021-29481","aliases":["CVE-2021-29481","GHSA-phj8-4cq3-794g"],"related":[],"kind":"vulnerability","state":"published","title":"Client side sessions should not allow unencrypted storage","summary":"Ratpack is a toolkit for creating web applications. In versions prior to 1.9.0, the default configuration of client side sessions results in unencrypted, but signed, data being set as cookie values. This means that if something sensitive goes into the session, it could be read by something with access to the cookies. For this to be a vulnerability, some kind of sensitive data would need to be stored in the session and the session cookie would have to leak. For example, the cookies are not configured with httpOnly and an adjacent XSS vulnerability within the site allowed capture of the cookies. As of version 1.9.0, a securely randomly generated signing key is used. As a workaround, one may supply an encryption key, as per the documentation recommendation.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Ratpack is a toolkit for creating web applications. In versions prior to 1.9.0, the default configuration of client side sessions results in unencrypted, but signed, data being set as cookie values. This means that if something sensitive goes into the session, it could be read by something with access to the cookies. For this to be a vulnerability, some kind of sensitive data would need to be stored in the session and the session cookie would have to leak. For example, the cookies are not configured with httpOnly and an adjacent XSS vulnerability within the site allowed capture of the cookies. As of version 1.9.0, a securely randomly generated signing key is used. As a workaround, one may supply an encryption key, as per the documentation recommendation.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nThe default configuration of client side sessions results in unencrypted, but signed, data being set as cookie values. This means that if something sensitive goes into the session, it could be read by something with access to the cookies.\n\nNote: the documentation does point this out and encourage users to add an encryption key, but it is not mandatory.\n\nFor this to be a vulnerability, some kind of sensitive data would need to be stored in the session and the session cookie would have to leak. For example, the cookies are not configured with httpOnly and an adjacent XSS vulnerability within the site allowed capture of the cookies.\n\nThe proposed change is to change the default behaviour to use a randomly generated encryption key. This would mean that sessions do not survive app restarts, but this is already the behaviour given the random signing key.\n\n### Patches\n\nAs of version 1.9.0, a securely randomly generated signing key is used.\n\n### Workarounds\n\nSupply an encryption key, as per the documentation recommendation.\n\n### References\n\n- https://github.com/ratpack/ratpack/pull/1590","format":"markdown","source":"ghsa"},{"lang":"es","text":"Ratpack es un kit de herramientas para crear aplicaciones web. En las versiones anteriores a 1.9.0, la configuración por defecto de las sesiones del lado del cliente resulta en datos no encriptados, pero firmados, que han sido establecidos como valores de cookies. Esto significa que si se introduce algo confidencial en la sesión, podría ser leído por alguien con acceso a las cookies. Para que esto sea una vulnerabilidad, algún tipo de dato confidencial tendría que ser almacenado en la sesión y la cookie de sesión tendría que filtrarse. Por ejemplo, las cookies no están configuradas con httpOnly y una vulnerabilidad de tipo XSS adyacente dentro del sitio permitió la captura de las cookies. A partir de la versión 1.9.0, se usa una clave de firma generada aleatoriamente de forma segura. Como solución, se puede proporcionar una clave de cifrado, según la recomendación de la documentación","source":"nvd"}],"published":"2021-06-29T18:20:12.000Z","modified":"2026-07-08T06:27:38.203Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","score":6.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:N/A:N","score":5,"rating":"MEDIUM"}],"cwes":["CWE-312"],"affected":[{"ranges":[{"version":"< 1.9.0","status":"affected"}],"vendor":"ratpack","product":"ratpack","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.9.0"}],"ecosystem":"Maven","package":"io.ratpack:ratpack-session","purl":"pkg:maven/io.ratpack/ratpack-session","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"1.9.0"}],"vendor":"ratpack_project","product":"ratpack","cpe":"cpe:2.3:a:ratpack_project:ratpack:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/ratpack/ratpack/security/advisories/GHSA-phj8-4cq3-794g","tags":["third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/ratpack/ratpack/pull/1590","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-29481","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/ratpack/ratpack","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-29481","url":"https://www.cve.org/CVERecord?id=CVE-2021-29481","licence":"CVE Terms of Use","modified":"2024-08-03T22:11:05.773Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-phj8-4cq3-794g","url":"https://github.com/advisories/GHSA-phj8-4cq3-794g","licence":"CC-BY-4.0","modified":"2026-07-08T06:27:38.203Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-29481","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-29481","licence":"Public domain","modified":"2026-06-17T03:47:43.877Z"}],"updatedAt":"2026-11-25T22:58:02.379Z","epss":{"score":0.00455,"percentile":0.41224,"date":"2026-12-02T12:00:21.000Z"}}