An AI Agent Found a Critical OTP Bypass in Production. The Attack Was the Easy Part.

Case study cover: how an AI pentester found a critical OTP bypass on a major insurer's production site
Share article
twitter linkedin medium facebook

The bug was simple: the login let you choose where your sign-in code went. Proving it on a live website was the hard part.

Originally published on The Hacker News here.

Case study Critical severity OTP bypass Live production website Found by an AI agent

TL;DR

  • During an authorized assessment, an AI pentesting agent found a critical authentication bypass on a major insurer’s production website, on its own.
  • One login request let the user choose where the one-time passcode went.
  • The attack was the easy part. Proving it on a live site took web context built over a decade.

Definition

What is an OTP bypass?

An OTP bypass is a flaw that lets someone pass a one-time passcode check without access to the phone or email registered to the account. A one-time passcode only proves identity when the server sends it to a destination already linked to the account. In this case, the login request named the destination, and the server sent the code there without checking it against the account.

The Login Worked. Then the Agent Stopped.

Reflectiz’s AI pentesting agent was mapping the login flow of a major insurer’s production website, which has millions of users.

The agent requested a login code and directed it to an email inbox it controlled. The code arrived. The login went through. Its guardrails halted the test after the login succeeded.

The agent had discovered a critical-severity authentication bypass on its own. Reflectiz reported it to the insurer.

The finding at a glance

DetailWhat happened
TargetA major insurer’s production website with millions of users
EngagementAuthorized assessment
FlawThe login request set the one-time passcode’s delivery channel and address
SeverityCritical authentication bypass
Found byReflectiz’s AI pentesting agent, on its own
ProofA targeted test through the live login flow confirmed the bypass
OutcomeGuardrails halted the test after login. Reflectiz reported the flaw to the insurer.

The Flaw: The Request Chose Where the Code Went

A one-time passcode (OTP) only proves who you are if it goes somewhere already linked to the account. Here, that link was broken.

The login request carried two fields that decided delivery: the channel and the address. Normally, the code went by text to the phone number on the account. But the request could change the channel. Switch it to email, and the server sent the code to whatever address the request named, not the address registered to the account.

Simplified, the request looked like this:

OTP request body in JSON with codeChannel switched from SMS to EMAIL and sendTo set to the agent's own inbox, the two fields behind the flaw

The server never checked that the address belonged to the account.

Expected OTP flow sends the code to the phone or email on file; on the insurer's site the server sent it to the inbox named in the request

Binding a code to its account is one of the most basic checks in authentication. OWASP’s testing guide asks this in plain words: “Are the OTPs tied to the correct user account…?”

The impact: An attacker with the required customer identifiers could potentially use the flaw to access that customer’s account.

From a Suspicious Field to a Proven Bypass

The agent began with reconnaissance, looking at the site’s JavaScript and the API calls behind its pages. That analysis surfaced the OTP request and two values that appeared to control how and where the code was sent. Values like those can suggest a hypothesis, but they’re not a finding, since the server might reject the changes or block them later in the login. So the agent built a targeted test around both values and ran it through the live login flow, which confirmed the bypass.

Anonymized illustration of the insurer's customer portal in the authenticated state the agent reached before its guardrails stopped the test
Illustration of the authenticated state the agent reached before stopping. Recreated and anonymized.

Want to see how that testing process works? Book a technical demo to examine how Reflectiz investigates website workflows, validates findings, and controls execution.

Web Context Is the Hard Part

Plenty of automated testing stops at the login gate, but much of what matters sits behind it. A testing system that cannot reach a workflow cannot assess what happens inside it.

Reflectiz solved that problem long before the agent existed. The company has spent more than a decade scanning thousands of production websites, which meant logging in, receiving verification codes, and navigating multi-step flows. So, on sites the company already monitors, the agent starts with that context instead of a blank URL.

Reflectiz’s agentic pentesting puts that web context to work. It drives a real browser through the flows a customer follows, including one-time passcodes and 2FA.

Reflectiz CTO and co-founder Ysrael Gurt, a longtime ethical hacker, built the agent on that foundation.

One Finding Is Not a Coverage Report

A confirmed vulnerability may show what failed, but it doesn’t show how much of the application was tested.

The OTP test ran alongside other attack plans on the same site. Reflectiz’s agentic pentesting pairs that open-ended investigation with a structured plan: test every discovered endpoint against every applicable attack category. A separate validator agent reproduces each suspected finding with the same payload and context before it is reported.

The output is a coverage record of which tests ran, their recorded outcomes, and any exclusions.

Pentested Is Not the Same as Secure

The insurer said it had pentested the site about six months earlier. This assessment found an exploitable login flaw, though it is unclear when the weakness was introduced.

That is not a reflection on human testers, because a skilled tester could have found this flaw too. It’s more a reflection on the nature of point-in-time testing. It has its place, but how often can anyone afford to look?

Websites change with every release, but pentest schedules don’t. They’re rigid, which isn’t much use against attackers who now use AI to find flaws fast and won’t wait for the next test window.

Agentic testing keeps pace. It can repeat focused tests as often as the site changes, provided the agent has the right access and clear boundaries, and produces evidence a reviewer can verify.

Reflectiz reports up to 10x the testing capacity at the same operational cost as traditional manual pentesting. The comparison concerns testing volume, rather than a guarantee of 10x more vulnerabilities found. In the demo, ask how scope, testing depth, and frequency affect capacity and cost for your applications.

Bring Your Toughest Website Workflow to the Demo

Book a 30-minute technical demo with a Reflectiz web security specialist. Before the demo, think about a workflow that matters to your business. It could be login, account recovery, checkout, or a customer portal.

During the demo you can then review:

  • How the agent navigates authenticated, multi-step workflows
  • What evidence it finds to support a validated finding
  • How scope, guardrails, and coverage are documented

Discuss your application’s requirements and what a first assessment would involve. No commitment is required, and there’s no need to test your website during the walkthrough.

FAQs

What is an OTP bypass?

An OTP bypass is a flaw that lets someone pass a one-time passcode check without access to the phone or email registered to the account. In the case Reflectiz found, the login request let the requester choose the delivery channel and address, so the server sent the code to an inbox the agent controlled instead of the account holder.

How did the AI pentesting agent find the OTP bypass?

The agent started with reconnaissance of the site’s JavaScript and the API calls behind its pages. That surfaced the OTP request and two values that appeared to control how and where the code was sent. The agent then built a targeted test around both values and ran it through the live login flow, which confirmed the bypass.

How do you prevent an OTP bypass vulnerability?

Bind every code to its account on the server. Send codes only to contact details already registered to the account, even when the user picks the channel, and never accept a destination address from the login request. OWASP’s testing guide checks this directly: are the OTPs tied to the correct user account? Retest after releases, since code changes can break the binding.

Can agentic pentesting test logins protected by one-time passcodes and 2FA?

Yes. Reflectiz’s agentic pentesting drives a real browser through the flows a customer follows, including one-time passcodes and 2FA. It builds on more than a decade of Reflectiz scanning thousands of production websites, which meant logging in, receiving verification codes, and navigating multi-step flows. On sites Reflectiz already monitors, the agent starts with that context instead of a blank URL.

Is it safe to run an AI pentesting agent on a production website?

It can be, when the agent has the right access, clear boundaries, and guardrails. In this authorized assessment, the guardrails halted the test right after the login succeeded, and Reflectiz reported the flaw to the insurer. A separate validator agent reproduces each suspected finding before it is reported, and the output is a coverage record a reviewer can verify.

Is a website secure if it was pentested recently?

Not necessarily. The insurer had pentested its site about six months before this assessment found an exploitable login flaw, though it is unclear when the weakness was introduced. Websites change with every release, while a point-in-time pentest reflects one moment. Agentic testing can repeat focused tests as often as the site changes.

Subscribe to our newsletter

Stay updated with the latest news, articles, and insights from Reflectiz.

AI Has Changed The Web.

Are You Ready for What’s Next?

Third-party code shifts by the hour. Supply-chain compromises strike without warning. AI-driven web attacks now evolve faster than traditional security can ever keep up.

Reflectiz delivers the continuous, real-time visibility needed to expose the risks traditional tools miss entirely.

Zero code changes. Zero access to your data. Ultimate peace of mind.

Try for free