WSO2 Identity Server SMS OTP Error Handling Enables Username Enumeration

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-2025-13166?

CVE-2025-13166 is a vulnerability classified as Observable Discrepancy, affecting WSO2 Identity Server (affected versions: 7.1.0 – < 7.1.0.40 and 7.2.0 – < 7.2.0.2). This vulnerability is rated Low, with a CVSS score of 3.7. Current sources do not report this vulnerability as exploited.

Overview

Original source data

The SMS OTP flow fails to adequately handle error messages, allowing an attacker to infer the existence of registered user accounts based on the responses received during the OTP initiation process. This weakness can be exploited by an attacker to discover valid usernames within the system. The impact is amplified for accounts that have not configured a mobile number, as the enumeration is specifically tied to this condition. The discovery of these usernames can facilitate subsequent brute force attacks, social engineering attempts, and information leakage, potentially leading to reputational damage, loss of customer trust, and regulatory non-compliance.

Affected products and scope

WSO2 Identity Server has a default status of unaffected, but the following branches are confirmed affected:

  • 7.1.0 branch: affected before 7.1.0.40.
  • 7.2.0 branch: affected before 7.2.0.2.

Other branches or releases are not established as affected or unaffected by the available evidence.

Technical details

The weakness is in how WSO2 Identity Server handles error messages in the SMS OTP flow. An attacker supplies candidate usernames during OTP initiation and infers which accounts are registered from the responses returned by the system. The enumeration is specifically tied to accounts that have not configured a mobile number. The record identifies network reachability, no required privileges, and no user interaction, while characterizing the attack complexity as high. The available evidence does not disclose the specific endpoint, status code, response field, or implementation function that creates the distinguishable behavior.

Exploitability

  • The vulnerable flow is reachable over the network through the SMS OTP initiation process.
  • The supplied record indicates that authentication and victim interaction are not required, although the attack complexity is high.
  • The relevant precondition is that responses allow an attacker to distinguish account existence, particularly for accounts without a configured mobile number.
  • The record sets public_exploit to false and known_exploited to null. These are record states, not proof that exploitation is impossible or has never occurred. The WSO2 advisory does not describe a specific exploitation campaign.

Technical impact

  • The confirmed technical outcome is disclosure of account existence and valid usernames.
  • A username list may increase the effectiveness of targeted brute force, phishing, or other social engineering attacks.
  • The record does not establish account takeover, credential disclosure, OTP disclosure, data modification, or service disruption as direct outcomes of this flaw.
  • At the organizational level, account enumeration may contribute to reputational damage, reduced customer trust, and regulatory compliance risk. Legal or financial consequences are possible outcomes, not confirmed events in the record.

Business impact

Valid usernames can provide reconnaissance data for targeted brute force or social engineering attacks. The exposure is concentrated on accounts that have not configured a mobile number because SMS OTP responses may distinguish that condition. Organizations may need to handle additional unauthorized login attempts, targeted phishing activity, and related investigations. WSO2 identifies possible reputational damage, loss of customer trust, and regulatory non-compliance; the record does not identify a specific breach or victim.

Remediation

  1. Upgrade the 7.1.0 branch to 7.1.0.40, the update level identified by WSO2 for that branch.
  2. Upgrade the 7.2.0 branch to 7.2.0.2, the update level identified by WSO2 for that branch.
  3. Community and Open Source users should apply the corresponding public fix provided by WSO2 in its advisory.
  4. Support Subscription holders should use WSO2 Updates to apply the applicable update level.
  5. If applying the fix or update is not feasible, migrate according to WSO2 guidance to an unaffected product release. The reviewed advisory specifies fixes and update levels, but does not specify a separate configuration workaround.

Detection

  1. Inventory deployments of WSO2 Identity Server that enable or expose the SMS OTP flow.
  2. Compare each deployment with the affected branches and exact version boundaries in affected_summary, rather than relying only on the major product version.
  3. In a controlled test environment, assess whether SMS OTP initiation produces distinguishable messages or responses when an account has or lacks a configured mobile number.
  4. Review available telemetry from OTP initiation for repeated requests across many candidate usernames. This is precautionary monitoring, not a vendor-confirmed indicator.
  5. Do not treat the absence of relevant log evidence as proof that the deployment is safe.
Sources (9)
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.