VDB
Sign up
MEDIUM4.8

GHSA-xmmm-jw76-q7vg

Keycloaks's One Time Passcode (OTP) is valid longer than expiration timeSeverity

Quick fix

GHSA-xmmm-jw76-q7vg — org.keycloak:keycloak-core: upgrade to the fixed version with the command below.

# pom.xml: bump <version>24.0.7</version> for org.keycloak:keycloak-core

Details

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.

Are you affected?

Enter the version of the package you're using.

Affected packages

Maven/org.keycloak:keycloak-core
Introduced in: 0Fixed in: 24.0.7
Fix# pom.xml: bump <version>24.0.7</version> for org.keycloak:keycloak-core
Maven/org.keycloak:keycloak-core
Introduced in: 25.0.0Fixed in: 25.0.4
Fix# pom.xml: bump <version>25.0.4</version> for org.keycloak:keycloak-core

References