Advisory Database
  • Advisories
  • Dependency Scanning
  1. maven
  2. ›
  3. org.keycloak/keycloak-core
  4. ›
  5. CVE-2024-7318

CVE-2024-7318: Keycloaks's One Time Passcode (OTP) is valid longer than expiration timeSeverity

October 14, 2024 (updated December 20, 2024)

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.

References

  • access.redhat.com/errata/RHSA-2024:6502
  • access.redhat.com/errata/RHSA-2024:6503
  • access.redhat.com/security/cve/CVE-2024-7318
  • bugzilla.redhat.com/show_bug.cgi?id=2301876
  • github.com/advisories/GHSA-xmmm-jw76-q7vg
  • github.com/keycloak/keycloak
  • github.com/keycloak/keycloak/security/advisories/GHSA-xmmm-jw76-q7vg
  • nvd.nist.gov/vuln/detail/CVE-2024-7318

Code Behaviors & Features

Detect and mitigate CVE-2024-7318 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 24.0.7, all versions starting from 25.0.0 before 25.0.4

Fixed versions

  • 24.0.7
  • 25.0.4

Solution

Upgrade to versions 24.0.7, 25.0.4 or above.

Impact 4.8 MEDIUM

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-324: Use of a Key Past its Expiration Date

Source file

maven/org.keycloak/keycloak-core/CVE-2024-7318.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 00:15:37 +0000.