typelevel/fs2 · Security
fs2-io skips mTLS client verification
- GHSA ID
- GHSA-2cpx-6pqp-wf35
- CVE ID
- CVE-2022-31183
- Severity
- critical
- Published
- Updated
- CVSS
- 9.8 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- CVSS v3
- 9.8 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Description
Impact
When establishing a server-mode TLSSocket using fs2-io on Node.js, the parameter requestCert = true is ignored, peer certificate verification is skipped, and the connection proceeds.
The vulnerability is limited to:
fs2-iorunning on Node.js. The JVM TLS implementation is completely independent.TLSSockets in server-mode. Client-modeTLSSockets are implemented via a different API.- mTLS as enabled via
requestCert = trueinTLSParameters. The default setting isfalsefor server-modeTLSSockets.
It was introduced with the initial Node.js implementation of fs2-io in v3.1.0.
Patches
A patch is released in v3.2.11. The requestCert = true parameter is respected and the peer certificate is verified. If verification fails, a SSLException is raised.
Workarounds
If using an unpatched version on Node.js, do not use a server-mode TLSSocket with requestCert = true to establish a mTLS connection.
References
- https://github.com/nodejs/node/issues/43994
- https://www.cloudflare.com/learning/access-management/what-is-mutual-tls/
For more information
If you have any questions or comments about this advisory:
- Open an issue.
- Contact the Typelevel Security Team.
CWEs
- CWE-295 · Improper Certificate Validation
References
- https://github.com/typelevel/fs2/security/advisories/GHSA-2cpx-6pqp-wf35 ↗
- https://github.com/nodejs/node/issues/43994 ↗
- https://github.com/typelevel/fs2/commit/19ce392e8093d9571387dbd78e159e655a85aeea ↗
- https://github.com/typelevel/fs2/releases/tag/v3.2.11 ↗
- https://nvd.nist.gov/vuln/detail/CVE-2022-31183 ↗
- https://github.com/typelevel/fs2/commit/659824395826a314e0a4331535dbf1ef8bef8207 ↗
- https://github.com/advisories/GHSA-2cpx-6pqp-wf35 ↗