GHSA-phj8-4cq3-794g

Suggest an improvement
Source
https://github.com/advisories/GHSA-phj8-4cq3-794g
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/07/GHSA-phj8-4cq3-794g/GHSA-phj8-4cq3-794g.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-phj8-4cq3-794g
Aliases
Published
2021-07-01T17:02:13Z
Modified
2023-11-08T04:05:35.291909Z
Severity
  • 6.5 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N CVSS Calculator
Summary
Unencrypted storage of client side sessions
Details

Impact

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.

Note: the documentation does point this out and encourage users to add an encryption key, but it is not mandatory.

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.

The 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.

Patches

As of version 1.9.0, a securely randomly generated signing key is used.

Workarounds

Supply an encryption key, as per the documentation recommendation.

References

  • https://github.com/ratpack/ratpack/pull/1590
Database specific
{
    "nvd_published_at": "2021-06-29T19:15:00Z",
    "github_reviewed_at": "2021-06-30T17:48:41Z",
    "severity": "MODERATE",
    "github_reviewed": true,
    "cwe_ids": [
        "CWE-312"
    ]
}
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