Medium severity · published Sep 9, 2024
CVE-2024-7318
Keycloak-core: one time passcode (otp) is valid longer than expiration timeseverity
4.8
CVSS
0.4%
EPSS
No
On KEV
Description
A vulnerability was found in Keycloak. Expired OTP codes are still usable when using FreeOTP when the OTP token period is set to 30 seconds (default). Instead of expiring and deemed unusable around 30 seconds in, the tokens are valid for an additional 30 seconds totaling 1 minute.
A one time passcode that is valid longer than its expiration time increases the attack window for malicious actors to abuse the system and compromise accounts. Additionally, it increases the attack surface because at any given time, two OTPs are valid.
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
Attack vector
Network
Complexity
High
Privileges
None
User interaction
None
Confidentiality
Low
Integrity
Low
Availability
None
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.4% · higher than 33% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
RH
Red Hat build of Keycloak 24 · Red Hat
All versions, or not specified · source: vendor
BO
Build OF Keycloak · Redhat
22.0 before 24.0.7 · source: NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2024-7318
CVE.org
https://www.cve.org/CVERecord?id=CVE-2024-7318
Issue Tracking
https://access.redhat.com/errata/RHSA-2024:6502
Issue Tracking
https://access.redhat.com/errata/RHSA-2024:6503
Vendor Advisory
https://access.redhat.com/security/cve/CVE-2024-7318
Issue Tracking
https://bugzilla.redhat.com/show_bug.cgi?id=2301876
More from Red Hat build of Keycloak 24
7.5
CVE-2024-4540
Keycloak: exposure of sensitive information in pushed authorization requests (par) kc_restart cookie
7.1
CVE-2024-7341
Wildfly-elytron: org.keycloak/keycloak-services: session fixation in elytron saml adapters
6.5
CVE-2024-10270
Org.keycloak:keycloak-services: keycloak denial of service
6.1
CVE-2024-7260
Keycloak-core: open redirect on account page
5.9
CVE-2024-10451
Org.keycloak:keycloak-quarkus-server: sensitive data exposure in keycloak build process
