CVE-2024-7318

Keycloak-core: one time passcode (otp) is valid longer than expiration timeseverity

MEDIUM
4.8
CVSS Score
Published: September 9, 2024 at 06:50 PM UTC
Updated: June 17, 2026 at 08:19 AM UTC
2 products affected across 2 vendorsBuild of KeycloakKeycloak

Using N/A by N/A?

Get instant alerts when new vulnerabilities affect N/A - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM4.8
Exploit prediction
EPSS 0.4%
SSVC
No known exploit

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

22.0 ≤ v < 24.0.7
Vendor states this is fixed in 24 (unaffected)
Vendor states this is fixed in 24-16 (unaffected)
Affected range stops below 24.0.7, so it looks safe — our inference, not a vendor statement
Vendor states this is fixed in 24.0.7-4 (unaffected)
All versions

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (4)

Vendor Advisoryx_refsource_REDHATIssue Tracking
https://access.redhat.com/errata/RHSA-2024:6502
Vendor Advisoryx_refsource_REDHATIssue Tracking
https://access.redhat.com/errata/RHSA-2024:6503
VDB Entryx_refsource_REDHATVendor Advisory
https://access.redhat.com/security/cve/CVE-2024-7318
Issue Trackingx_refsource_REDHATVendor Advisory
https://bugzilla.redhat.com/show_bug.cgi?id=2301876

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

4.8MEDIUMredhat
Attack Vector
NETWORK
Complexity
HIGH
Privileges
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
LOW
Integrity
LOW
Availability
NONE
Vector?

Quick Info

StatusANALYZED
CWE
CWE-324

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card