Security Resilience

CVE-2024-7318

Redhat Build Of Keycloak 22.0 – 24.0.7

Published
09 September 2024
Modified
07 October 2024
Patch / advisory
CVSS Score v3.1 4.8
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
EPSS Score 0.0039 34th percentile
Risk Priority 42 floored blend · peak EPSS

CVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). EPSS, Forum of Incident Response and Security Teams (FIRST), epss.first.org. Risk Priority is our own derived reading, not an NVD score.

Summary

CVE-2024-7318 is a medium-severity Use of a Key Past its Expiration Date (CWE-324) vulnerability in Redhat Build Of Keycloak. Its CVSS base score is 4.8 (Medium).

Operationally, exploitation aligns with the MITRE ATT&CK technique Valid Accounts (T1078); ranked at the 34th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.

The strongest mitigations our analysis identified map to IA-5 (Authenticator Management) and SC-12 (Cryptographic Key Establishment and Management) — see the control section below for these in your framework.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

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…

more

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.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

MITRE ATT&CK v20.0

T1078 Valid Accounts Stealth
Adversaries may obtain and abuse credentials of existing accounts as a means of gaining Initial Access, Persistence, Privilege Escalation, or Defense Evasion.
T1110.002 Password Cracking Credential Access
Adversaries may use password cracking to attempt to recover usable credentials, such as plaintext passwords, when credential material such as password hashes are obtained.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2026-9705Same product: Redhat Build Of Keycloak
CVE-2026-9802Same product: Redhat Build Of Keycloak
CVE-2026-37982Same product: Redhat Build Of Keycloak
CVE-2026-9795Same product: Redhat Build Of Keycloak
CVE-2026-4629Same product: Redhat Build Of Keycloak
CVE-2026-12388Same product: Redhat Build Of Keycloak
CVE-2026-9794Same product: Redhat Build Of Keycloak
CVE-2026-4633Same product: Redhat Build Of Keycloak
CVE-2026-14615Same product: Redhat Build Of Keycloak
CVE-2026-14613Same product: Redhat Build Of Keycloak

Affected Assets

redhat
build of keycloak
22.0 — 24.0.7

Mitigating Controls

Mitigating Controls (NIST 800-53 r5)

Our mappings, made for this CVE.

SC-12 requires establishing and managing cryptographic keys including distribution, storage, access and destruction, which directly enforces expiration and rotation policies.

IA-5 requires managing authenticators (including passwords and tokens) with verification, distribution and revocation steps that cover expiration enforcement.

Mitigating Controls (NIST CSF 2.0)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→CSF cross-walk — links open the control.

ID.AM-08 partial match
blocks

Lifecycle management of cryptographic assets directly includes enforcing key expiration and rotation.

Mitigating Controls (ISO/IEC 27001:2022 Annex A)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→ISO cross-walk — links open the control.

prevents

Training developers about cryptographic key management and certificate validation can reduce instances of expired-key usage, but the effect is a minority one because the weakness is a specific code defect (failing to check expiration) and training is fallible; the strongest controls for this weakness sit in A.8.24 (cryptography policy) and A.8.29 (security testing), not in awareness.

blocks

A.8.24 mandates key management practices including expiration dates, retirement, and revocation, so a well-implemented system does not use expired keys at all — the weakness is prevented from arising or removed when keys expire, not left in place and blocked from exploitation.

prevents

A.8.28 mandates secure coding standards and practices that can include key lifecycle handling (checking expiration, rotating keys), and its guidance on common coding defects and secure design/architecture reaches this weakness, but the clause mandates a practice rather than a mechanism, so coverage depends on what the standard actually specifies and on developer adherence — consistent with the `partial` rungs on A.8.28 vs CWE-502 and CWE-79.

finds

A.8.29's security testing programme (SAST, DAST, penetration testing) can discover an expired key in the application's own code or configuration during acceptance testing, but the weakness is often a runtime operational state (a key that was valid at deployment and has since expired) that a pre-deployment test cycle does not observe, so only a minority of instances are found.

prevents

A.8.30 carries its effect through contractual requirements for secure design, coding and testing practices (8.25-8.29), which can reach CWE-324 as a software implementation weakness where secure coding mandates expiration checks and security testing verifies them; however, key expiration is often an operational/lifecycle concern beyond what outsourced development contracts govern, and the clause's effect depends on the supplier implementing the required practices, leaving a nameable remainder.

finds

A.8.8 can surface the disclosed or externally visible instances such as expired certificates through vulnerability awareness and scanning, but it misses the larger share of embedded, internal, or undisclosed expired-key/password defects, so it finds only a minority.

References