CVE-2019-10157: Keycloak keycloak-connect JWT signature validation bypass

CVE-2019-10157 · Severity: low · CVSS 3 · Published 2019-06-13

keycloak-connect is a Node.js library that provides authentication integration with Keycloak identity servers. A flaw in the logout endpoint fails to validate JWT signatures, allowing attackers to forge tokens and force user logouts or lock users out indefinitely by creating JWTs with future validity dates.

Technologies: keycloak-connect (npm). Vendors: npm.

Quick answers

Is CVE-2019-10157 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2019-10157 being exploited in the wild.
How severe is CVE-2019-10157?
Low severity, with a CVSS score of 3, published 13 June 2019.
Which products and versions are affected?
keycloak-connect (npm) SEMVER:introduced=0,fixed=4.8.3.
Is there a fix for CVE-2019-10157?
Yes. keycloak-connect (npm): upgrade to 4.8.3 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2019-10157 attacked?
It is attacked with local access, in a software library.
Am I affected by CVE-2019-10157?
Check whether you run keycloak-connect (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • keycloak-connect (npm): upgrade to 4.8.3 or later
    npm install keycloak-connect@4.8.3

Technical details

keycloak-connect versions prior to 4.4.0 fail to validate JWT signatures on the /k_logout route, resulting in an authentication bypass vulnerability (CWE-287). An attacker can exploit this by crafting malicious JWTs with arbitrary NBF (not-before) claims and submitting them to the logout endpoint. The vulnerability allows forced logout of active users and can lock users out indefinitely by setting the NBF to a future date. The fix is available in version 4.4.0 and later.

Affected products

  • Keycloak keycloak-connect prior to 4.4.0

Identifiers

  • CVE-2019-10157
  • GHSA-68hw-vfh7-xvg8

Timeline

  • 2019-06-13: disclosed
  • 2019-06-13: patched: Fixed in version 4.4.0

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.