GHSA-2cc5-23r7-vc4v

Suggest an improvement
Source
https://github.com/advisories/GHSA-2cc5-23r7-vc4v
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/07/GHSA-2cc5-23r7-vc4v/GHSA-2cc5-23r7-vc4v.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-2cc5-23r7-vc4v
Aliases
Published
2021-07-01T17:02:26Z
Modified
2023-11-08T04:05:35.231497Z
Severity
  • 4.4 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N CVSS Calculator
Summary
Ratpack's default client side session signing key is highly predictable
Details

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.

Database specific
{
    "nvd_published_at": "2021-06-29T19:15:00Z",
    "github_reviewed_at": "2021-06-30T17:49:41Z",
    "severity": "MODERATE",
    "github_reviewed": true,
    "cwe_ids": [
        "CWE-330",
        "CWE-340"
    ]
}
References

Affected packages

Maven / io.ratpack:ratpack-session

Package

Name
io.ratpack:ratpack-session
View open source insights on deps.dev
Purl
pkg:maven/io.ratpack/ratpack-session

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.9.0

Affected versions

0.*

0.9.0
0.9.1
0.9.2
0.9.3
0.9.4
0.9.5
0.9.6
0.9.7
0.9.8
0.9.9
0.9.10
0.9.11
0.9.12
0.9.13
0.9.14
0.9.15
0.9.16
0.9.17
0.9.18
0.9.19

1.*

1.0.0-rc-1
1.0.0-rc-2
1.0.0-rc-3
1.0.0
1.1.0
1.1.1
1.2.0-RC-1
1.2.0-rc-2
1.2.0
1.3.0-rc-1
1.3.0-rc-2
1.3.0
1.3.1
1.3.2
1.3.3
1.4.0-rc-1
1.4.0-rc-2
1.4.0-rc-3
1.4.0
1.4.1
1.4.2
1.4.3
1.4.4
1.4.5
1.4.6
1.5.0
1.5.1
1.5.2
1.5.3
1.5.4
1.6.0-rc-1
1.6.0-rc-2
1.6.0-rc-3
1.6.0-rc-4
1.6.0
1.6.1
1.7.0
1.7.1
1.7.2
1.7.3
1.7.4
1.7.5
1.7.6
1.8.0
1.8.1
1.8.2
1.9.0-rc-1
1.9.0-rc-2