Bug 1912427 (CVE-2020-35509) - CVE-2020-35509 keycloak: X509 Direct Grant Auth does not verify certificate timestamp validity
Summary: CVE-2020-35509 keycloak: X509 Direct Grant Auth does not verify certificate t...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2020-35509
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1901620 1939868
TreeView+ depends on / blocked
 
Reported: 2021-01-04 12:40 UTC by Paramvir jindal
Modified: 2022-12-05 14:13 UTC (History)
39 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in keycloak. An expired certificate would be accepted by the direct-grant authenticator because of missing time stamp validations. The highest threat from this vulnerability is to data confidentiality and integrity.
Clone Of:
Environment:
Last Closed: 2021-09-14 18:21:09 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2021:3527 0 None None None 2021-09-14 12:34:28 UTC
Red Hat Product Errata RHSA-2021:3528 0 None None None 2021-09-14 12:31:18 UTC
Red Hat Product Errata RHSA-2021:3529 0 None None None 2021-09-14 12:32:21 UTC
Red Hat Product Errata RHSA-2021:3534 0 None None None 2021-09-14 12:37:39 UTC

Description Paramvir jindal 2021-01-04 12:40:17 UTC
Depending on the webserver configuration, a malicious user can supply an expired certificate and it would be accepted by Keycloak direct-grant authenticator. This is because Keycloak does not trigger the appropriate timestamp validation.

X509 Direct Grant: https://github.com/keycloak/keycloak/blob/4f330f4a57cbfcf6202b60546518261c66e59a35/services/src/main/java/org/keycloak/authentication/authenticators/x509/ValidateX509CertificateUsername.java#L74-L76

It would seem like PR https://github.com/keycloak/keycloak/pull/6330 missed a spot in adding the validateTimestamps call.

https://issues.redhat.com/browse/KEYCLOAK-16450

Comment 3 Paramvir jindal 2021-01-05 13:37:45 UTC
Acknowledgments:

Name: Luca Leonardo Scorcia

Comment 5 errata-xmlrpc 2021-09-14 12:31:16 UTC
This issue has been addressed in the following products:

  Red Hat Single Sign-On 7.4 for RHEL 7

Via RHSA-2021:3528 https://access.redhat.com/errata/RHSA-2021:3528

Comment 6 errata-xmlrpc 2021-09-14 12:32:19 UTC
This issue has been addressed in the following products:

  Red Hat Single Sign-On 7.4 for RHEL 8

Via RHSA-2021:3529 https://access.redhat.com/errata/RHSA-2021:3529

Comment 7 errata-xmlrpc 2021-09-14 12:34:26 UTC
This issue has been addressed in the following products:

  Red Hat Single Sign-On 7.4 for RHEL 6

Via RHSA-2021:3527 https://access.redhat.com/errata/RHSA-2021:3527

Comment 8 errata-xmlrpc 2021-09-14 12:37:37 UTC
This issue has been addressed in the following products:

  Red Hat Single Sign-On 7.4.9

Via RHSA-2021:3534 https://access.redhat.com/errata/RHSA-2021:3534

Comment 9 Product Security DevOps Team 2021-09-14 18:21:09 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2020-35509


Note You need to log in before you can comment on or make changes to this bug.