Vulnerability Fixation
OTP Bypass

OTP Is Sent In Response To The OTP Request

A concerning vulnerability arises when One-Time Passwords (OTPs) are mishandled, such as when an OTP is sent as a direct response to an OTP request without proper verification or uniqueness.

This exposes the system to replay and automation attacks, where attackers can capture and reuse the same OTP to gain unauthorized access. To prevent this, OTPs should be generated securely on the server side, tied to a specific session or user, and validated only once with proper expiration controls.

Vulnerability

  • If an OTP is sent back in the HTTP response without verifying the requester, attackers can easily capture it especially over insecure channels (e.g., plaintext HTTP).
  • This makes unauthorized access possible by simply initiating and intercepting OTP requests.
Impact

  • OTPs can be intercepted via Man-in-the-Middle attacks.
  • Attackers can reuse valid OTPs (replay attacks).
  • Automated bots can exploit predictable OTP APIs.
Solution

  • Generate OTPs dynamically using secure algorithms (HOTP/TOTP).
  • Bind OTPs to user sessions and set short expiry (30–60 sec).
  • Send OTPs only over HTTPS or encrypted channels.
  • Limit OTP requests per user to prevent abuse.
  • Add MFA or device-based verification for added security.

Also Read :