Back to all lessons
Awareness Lessons
4 days ago

AI Agent Exposes Critical OTP Bypass in Live Insurance Portal

A major insurer's production website contained a critical authentication bypass flaw that allowed one-time passcodes (OTPs) to be redirected to an attacker-controlled email address, rendering multi-factor authentication ineffective. The root cause was a failure to properly validate and bind OTP delivery to the authenticated user's verified contact information, a fundamental access control design flaw. This matters because OTP-based MFA is widely trusted as a second line of defense — if it can be silently hijacked, attackers gain full account access with no visible indication to the legitimate user. The fact that an AI agent autonomously discovered this in production underscores that automated adversaries are now capable of finding logic-level authentication flaws at scale, not just technical CVEs.

Tactical Insight

Immediate actions

  • Audit all OTP and MFA delivery flows to ensure passcodes are cryptographically bound to the session and verified recipient identity before dispatch.
  • Conduct targeted penetration testing on all authentication and account recovery workflows in both staging and production environments.

Long-term improvements

  • Implement server-side validation that strictly ties OTP issuance to the authenticated user's pre-verified contact channel, rejecting any runtime redirection attempts.
  • Adopt a secure-by-design SDLC process that includes threat modeling for authentication flows before code reaches production.
  • Enforce separation between OTP generation logic and any user-controllable input fields to eliminate injection or redirection attack surfaces.

Detection measures

  • Deploy anomaly detection on OTP request patterns, alerting on unusual volumes, destination mismatches, or rapid successive requests from a single session.
  • Log all OTP generation and delivery events with immutable audit trails, including destination address, timestamp, and originating session metadata, and review them regularly.

Back this up with a control

All controls and vendors

Training helps people spot this. These controls make the attack fail even on the day someone does not.