Non-expiring SMS OTPs in WSO2 Identity Server enable brute-force MFA bypass

Note: This data is for reference and cybersecurity research purposes only.CyStack advises users not to use this information for unlawful purposes.

What is CVE-2024-8122?

CVE-2024-8122 is a vulnerability classified as Insufficient Session Expiration, affecting WSO2 Identity Server (affected versions: 5.11.0 – < 5.11.0.372, 6.0.0 – < 6.0.0.227, and other affected versions). This vulnerability is rated Medium, with a CVSS score of 5.9. Current sources do not report this vulnerability as exploited.

Overview

Original source data

The WSO2 Identity Server fails to enforce a default expiry time for SMS One-Time Passwords (OTPs) used in multi-factor authentication (MFA). This allows unused OTPs to remain valid indefinitely, presenting an opportunity for malicious actors to conduct brute force attacks by repeatedly guessing the OTP. The absence of automatic expiration for OTPs grants attackers an unlimited timeframe to attempt guessing the correct code. A successful brute force attack can lead to an MFA bypass, resulting in the unauthorized takeover of a user's account and compromising the security and privacy of both the individual and the system.

Affected products and scope

  • WSO2 Identity Server 5.11.0 through versions less than 5.11.0.372 is marked affected.
  • WSO2 Identity Server 6.0.0 through versions less than 6.0.0.227 is marked affected.
  • WSO2 Identity Server 6.1.0 through versions less than 6.1.0.219 is marked affected.

The record sets the product default status to unaffected outside the listed entries. Any branch or update not listed should be checked separately against WSO2 guidance because the available evidence does not establish the status of every parallel or later release branch.

Technical details

WSO2 Identity Server does not enforce a default expiry for unused SMS OTPs in the MFA flow. As a result, an OTP can remain valid indefinitely, allowing an attacker to submit repeated guesses until the correct value is accepted. The described condition requires an unused SMS OTP to exist in the MFA flow, but the record does not explain how the challenge is initiated. The record characterizes the path as network reachable, requiring no prior privileges or user interaction, while assigning high attack complexity. A successful guess can bypass MFA and result in unauthorized account takeover. The record does not identify the endpoint, OTP length, retry limits, account lockout behavior, or implementation function, so those details should not be assumed.

Exploitability

The attack is reachable over the network and the record does not require prior authentication privileges or user interaction. Exploitation depends on repeatedly guessing an SMS OTP while it remains valid, and the documented attack complexity is high. The supplied record marks public_exploit as false and does not provide a known_exploited status, so the supplied evidence does not identify public exploit code or known exploitation. It also names no campaign, victim, tool, endpoint, or specific exploitation indicator.

Technical impact

The missing OTP expiry weakens the time boundary of SMS-based MFA because an unused code can continue to be tested indefinitely. If a guess succeeds, the documented result is MFA bypass and unauthorized access, potentially including account takeover. The primary recorded consequence is exposure of confidential information and user privacy, while the record does not establish an impact to data integrity or service availability. Actual exposure depends on code-guessing feasibility, any deployed retry or account-lockout controls, and MFA-flow conditions that the advisory does not describe.

Business impact

Accounts protected by SMS OTP MFA in WSO2 Identity Server may remain exposed to guessing attempts for longer than intended. A successful attack could provide unauthorized access to an account and expose user data or private information. Organizations may need to contain affected accounts, review authentication activity, and investigate the integrity of their MFA controls. The record does not identify a specific breach or confirmed data compromise.

Remediation

  1. Apply the WSO2 update for the relevant product branch: use U2 update level 372 for the 5.11.0 branch, U2 update level 227 for the 6.0.0 branch, and U2 update level 219 for the 6.1.0 branch.
  2. After updating, confirm that SMS OTPs have the vendor-documented default expiry of five minutes. The expiry can be adjusted for the deployment by setting TokenExpiryTime in /repository/conf/deployment.toml.
  3. Re-test the MFA flow in a controlled environment, including rejection of an expired OTP, before broad deployment.
  4. The supplied vendor advisory does not specify a separate temporary mitigation for unpatched branches. Do not treat a configuration change as a replacement for the update unless the behavior of the running product version has been validated.

Detection

  1. Inventory WSO2 Identity Server deployments that use SMS OTP MFA and identify the product branch and update level for each system.
  2. Inspect the SMS OTP authenticator configuration, including TokenExpiryTime in /repository/conf/deployment.toml, and confirm that the effective value matches the intended expiry policy.
  3. Use a controlled test account in a non-production environment to confirm that an unused SMS OTP is rejected after the configured expiry period. Configuration inspection or an isolated test does not by itself prove that the running product branch contains the fix.
  4. As a precaution, review authentication telemetry for repeated OTP failures or unusual guessing patterns. The advisory does not define a specific IOC or log signature, and the absence of such evidence does not prove that the system is safe.
Sources (10)
Learn more

Run an in-depth assessment with complete web risk management

CyStack VulnScan continuously discovers assets, validates vulnerabilities, and helps security teams prioritize remediation across the organization.