DEV Community

Cover image for AI Created Its First Real Cyber Attack And It Bypassed 2FA
Shrestha Pandey
Shrestha Pandey

Posted on

AI Created Its First Real Cyber Attack And It Bypassed 2FA

For the first time, AI has been used to exploit a software vulnerability. Google discovered it in May 2026, and the consequences could be serious.

The Moment Everything Changed

In May 2026, Google’s Threat Intelligence Group identified something that security researchers had been warning about for years, and it came sooner than expected.

Hackers used an AI model to create a working zero-day exploit, a cyber attack that targets a vulnerability no one knows about yet. And it wasn’t a simple attack. It bypassed two-factor authentication (2FA), the security layer that millions of people trust every single day.

This is the first case of AI weaponizing a vulnerability for real-world attacks. Before this, zero-days required elite hackers and months of research. But now, AI can find them in hours.

Let’s breakdown what happened and why it’s so terrifying.

What Got Attacked?

The target of attack was an open-source web-based system administration tool. Google didn’t disclose the name, but it’s a popular system that IT companies used to manage servers, websites and computers.

The exploit let attackers log in without entering the second authentication code, even when 2FA was turned on. You could enter the password and the system would log you in directly, skipping the phone code setup completely.

The vulnerability was not just some coding mistake like memory error, it was a logic flaw.

The developers hardcoded something like:

if user_is_admin:
skip_2fa = True
Enter fullscreen mode Exit fullscreen mode

The traditional security scanners missed it, but AI found it.

How the Attack Worked?

The AI used by hackers, wrote some Python script.

The script still needed valid credentials to work, so knowing the correct password was required. But as soon as it had these credentials, it was able to bypass 2FA entirely. There was no phone code or verification required, and it went straight into the account.

The major plan was mass exploitation. The cybercrime group wanted to use this on thousands of users of the tool at once. There goal was going after everyone using the software, not just one company.

Google worked with the vendor to fix the vulnerability so the mass exploitation didn’t happen. But the exploit was real and AI created it.

The AI Tells: How We Know It Was AI

This was not just an assumption, the code had clear AI fingerprints.

  1. Overly Explanatory Comments: The script had comments that explained what every function did, like a teacher walking through code. Human hackers don't write comments like that, but AI does.

  2. A Hallucinated CVSS Score: The code had a CVSS score, that is, a security vulnerability rating, but the score didn't really exist, AI made it up.This was a hallucination, a common AI mistake.

  3. Textbook Python Format: The code was perfectly clean without any hacker shortcuts or any optimizations. It was like a textbook Python from AI training data.

  4. A Junk _C Color Class: The script used a basic ANSI color class named _C. It's a common pattern in AI-generated code. Google found this exact pattern in multiple AI scripts.

A human hacker wouldn't include these points. They're too neat, too educational, too obvious, which indicates AI does this.

Why AI Found This Flaw

Zero-day vulnerabilities require elite security talent. It actually needs someone who can read code, understand intent, and spot contradictions, which is hard.

Modern large language models (LLMs) have something called context reasoning. They can:

  • Read through thousands of lines of code
  • Understand what the developer was trying to do
  • Find contradictions between intent and implementation
  • Surface logic errors that look correct but are broken

The zero-day was a high-level logic flaw. Security scanners don’t catch these. They look for memory errors, syntax mistakes, known vulnerability patterns, but they don’t understand developer intent.

Google said frontier LLMs (the biggest AI models) are getting better at this. They can spot logic errors the way a senior security engineer would. But they do it faster, and they don’t get tired.

Why This Changes Everything

The scary part is, this will happen more.

  1. Zero-Days are now scalable: Before AI, finding a zero-day was skilled work but now, AI can scan code, find logic flaws, and write exploits in hours.

  2. 2FA is not 100% safe: Two-factor authentication is the gold standard for security. It’s what you tell your employees to use. It’s what banking apps require to keep accounts safe. This exploit bypassed it.

  3. AI can find flaws humans miss: Traditional security tools look for patterns, check for known vulnerabilities, but they don’t understand intent. AI understands intent, reads code like a human would and finds contradictions, that are the most dangerous vulnerabilities.

What Developers Should Do Right Now

You can’t stop AI from finding vulnerabilities, but you can make yourself a tougher target.

  1. Update Your Packages Faster: When a vulnerability is announced, patch it as soon as you can. Attackers are moving faster with AI, so waiting weeks to update is a risk. If there’s a fix, apply it quickly.

  2. Audit Your Dependencies: Check what libraries and tools you're using. Are they popular? Do they have security teams? Are they open-source? Audit your entire dependency tree. Each one is a potential attack vector.

  3. Don't Trust AI Code 100%: If you use AI to write code, always review it. AI can get things wrong, add insecure code, or suggest solutions that don’t really work.

  4. Get Ready for More AI-Powered Attacks: AI-driven attacks aren’t going away. Set up monitoring, watch for unusual activity, rotate passwords and keys regularly, and have a plan for handling security incidents.

Final thoughts

The AI-created zero-day is a turning point. It shows that AI is no longer just a future threat, it's already being used in real attacks.

2FA is still a strong layer of security, but it’s not perfect. Logic flaws are still dangerous, and now AI can help find them faster. Zero-days are still uncommon, but creating them is becoming easier.

This is just the beginning.

The next thing could be much bigger.

Top comments (0)