CVE-2021-29480: Ratpack session Ratpack's Default Client Side Session Vulnerability
MODERATECVE-2021-29480 is a MODERATE (CVSS 4.4) ratpack's default client side session vulnerability (CWE-330: Use of Insufficiently Random Values) affecting Ratpack session libraries in the Maven ecosystem. The issue involves ratpack's default client side session signing key is highly predictable. Remediation is available by upgrading affected packages to version 1.9.0.
CVE-2021-29480 at a Glance
Security Impact
CVSS: 4.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N).
How to Fix CVE-2021-29480
To remediate this vulnerability, upgrade all affected Ratpack session dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>io.ratpack</groupId>
<artifactId>ratpack-session</artifactId>
<version>1.9.0</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=io.ratpack
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2021-29480, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=io.ratpack
Analyze the terminal output to locate any version of Ratpack session in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.9.0), your application is affected.
Note: The mvn dependency:tree -Dincludes=io.ratpack command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-330: Use of Insufficiently Random Values, where the product uses insufficiently random numbers or values in a security context that depends on unpredictable numbers. In Ratpack session, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2021-29480 Affected Ratpack session Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
io.ratpack:ratpack-session
|
Maven |
< 1.9.0
|
1.9.0
|
References
Frequently Asked Questions
What is CVE-2021-29480?
Which Ratpack session versions are affected?
What version fixes CVE-2021-29480?
Is ratpack-session affected?
What is the CVSS score of CVE-2021-29480?
What CWE is associated with CVE-2021-29480?
How can I check Maven dependencies for CVE-2021-29480?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-2cc5-23r7-vc4v",
"modified" : "2022-08-11T00:17:56Z",
"published" : "2021-07-01T17:02:26Z",
"aliases" : [ "CVE-2021-29480" ],
"summary" : "Ratpack's default client side session signing key is highly predictable",
"details" : "### Impact\n\nThe 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. \n\nThe 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.\n\n### Vulnerability Location\n\nhttps://github.com/ratpack/ratpack/blob/29434f7ac6fd4b36a4495429b70f4c8163100332/ratpack-session/src/main/java/ratpack/session/clientside/ClientSideSessionConfig.java#L29\n\n### Patches\n\nAs of Ratpack 1.9.0 the default value is a securely randomly generated value, generated at application startup time. \n\n### Workarounds\n\nSupply an alternative signing key, as per the documentation's recommendation.\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "io.ratpack:ratpack-session"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.9.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/ratpack/ratpack/security/advisories/GHSA-2cc5-23r7-vc4v"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-29480"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ratpack/ratpack"
}, {
"type" : "WEB",
"url" : "https://github.com/ratpack/ratpack/blob/29434f7ac6fd4b36a4495429b70f4c8163100332/ratpack-session/src/main/java/ratpack/session/clientside/ClientSideSessionConfig.java#L29"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-330", "CWE-340" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-06-30T17:49:41Z",
"nvd_published_at" : "2021-06-29T19:15:00Z"
}
}