AI Security · 5 min read · Updated

Why Web Security Still Matters in the Age of AI

Every few years someone declares web security solved. Every year the breach reports say otherwise. Here is why the seams between components, and now AI features, keep attackers in business.

why web security still matters in age of AI

Every few years someone announces that web security is a solved problem. Frameworks escape output by default. Browsers ship stricter policies with every release. Cloud providers sell managed firewalls. And now artificial intelligence promises to find and fix bugs before a human ever sees them.

Then the annual breach reports arrive, and they tell the same story they told a decade ago: stolen credentials, broken access control, injection flaws, misconfigured storage buckets, and vulnerable third-party components remain the dominant ways real organizations get compromised.

So what is going on?

The web is not one technology

A modern web application is not a single program. It might combine a single-page JavaScript front end, a dozen microservices, three databases, a message queue, an identity provider, a CDN, a payment processor, a handful of SaaS integrations, and, increasingly, a large language model that can read documents, call tools, and take actions on a user’s behalf.

Each of those pieces was built by different people, under different deadlines, with different assumptions about who it can trust. Security failures almost always live in the seams between them. The front end assumes the API checks permissions. The API assumes the gateway did. The gateway assumes the request came from the front end. Nobody actually checks.

Better frameworks have closed many individual holes, but they cannot close the seams, because the seams are created by how your system is put together.

Diagram of a browser app, API gateway, orders API and database, each assuming another component checked permissions, so nobody checks
Security failures live in the seams: each component assumes another one did the check.

The attacker mindset is the real skill

Developers think about what software should do. Attackers think about what software can be made to do. That difference in perspective is the most important skill in web security, and it can be learned.

When a developer sees a URL like /api/orders/1842, they see a way to fetch an order. An attacker sees a number and immediately asks what happens if it becomes 1841, 0, -1, a string, a huge number, or an array.

The mindset rests on a few habits:

  • Question every assumption. The client is not trusted. Hidden fields are not hidden. JavaScript validation is a usability feature, not a security control. Headers can be forged and cookies can be edited.
  • Follow the data. Trace every piece of input from where it enters the system to every place it is stored, rendered, or executed.
  • Find the trust boundaries. Wherever data crosses from less trusted to more trusted, something should be checking it. Often nothing is.

What AI actually changes

AI does not replace the old vulnerability classes. It adds new ones and speeds up the old ones.

New attack surface. An LLM feature mixes instructions and data in a single context window, and models cannot reliably tell them apart. That is why prompt injection looks so familiar to anyone who has studied SQL injection: untrusted input is changing the meaning of the “code”. When that model can also call tools, send email, or browse the web, an injected instruction becomes a real-world action.

New security properties. Confidentiality, integrity, and availability are still what we protect. For AI systems, two more join them: privacy (what the model saw and might repeat) and controllability (whether the system does only what its owner intends).

Faster attackers and defenders. Attackers use AI to scale phishing, research, and exploit development, which shrinks the window between a patch and its exploitation. Defenders use the same tools for code review, triage, and automatic fixes. The organizations that win are the ones that pair AI speed with deterministic controls that do not depend on a model behaving well.

Where today’s attacks really come from

If you want to prioritize, the current threat landscape is dominated by a short list:

  1. Credential attacks: stuffing, spraying, and phishing, often against accounts without phishing-resistant MFA.
  2. Broken access control: users reaching data or functions that belong to someone else. It sits at the top of the OWASP Top 10 for good reason.
  3. Supply chain compromise: malicious or vulnerable dependencies, compromised build pipelines, and now AI models and tool servers.
  4. Cloud misconfiguration: public buckets, over-privileged roles, and exposed metadata services.
  5. Attacks on AI features: prompt injection, data exfiltration through rendered output, and agents with too much power.

Notice that most of these are not exotic. They are fundamentals, applied inconsistently.

Layered, secure-by-default defense

No single control saves you. Two principles do most of the work:

  • Defense in depth means stacking independent controls so one failure is not fatal. Parameterized queries and a least-privilege database account and monitoring.
  • Secure by default means the easy path is the safe path. A framework that escapes output automatically, a cookie library that sets Secure and HttpOnly unless told otherwise, a tool that only acts on the logged-in user’s data.

For AI features, the same idea becomes one rule: never let the model be the only thing standing between an attacker and something valuable.

A word on ethics

Everything above applies equally to attackers and defenders, which is why one rule comes before all others: only test systems you own or have explicit written permission to test. Bug bounty programs and vulnerability disclosure policies exist precisely to give researchers that permission. Read the scope before you touch anything.

Key takeaways

  • Security failures concentrate in the seams between components, which frameworks cannot fix for you.
  • The attacker mindset (question assumptions, follow the data, find trust boundaries) is a learnable skill.
  • AI adds a new injection-style attack surface and speeds up both offense and defense.
  • Fundamentals like access control, credential protection, and patching still prevent most breaches.
  • Test only what you are authorized to test. Always.

Go deeper with the book

This article is adapted from Web Security in the Age of AI: Attacks, Defenses, Tools, and Bug Hunting for Modern Web Applications and LLM Systems by Rupak (see Chapter 1, “Why Web Security Still Matters”).

The book pairs every attack with its fix across 27 chapters, from core vulnerabilities and professional tools to bug bounty hunting, attacking and defending LLM applications, and lessons from real breaches. It includes hands-on labs, review questions, a full testing checklist, a security headers reference, and an LLM red teaming playbook.

Filed underAI Security
Tagged
Rupak Nepali
Written byRupak Nepali

Rupak Nepali is a web developer, manage Webocreation website and the author of six books:
Getting Started with OpenCart Module Development (Packt, 2013),
OpenCart Theme and Module Development (Packt, 2015),
OpenCart 4: Dev Guide for Themes & Extensions (2024),
OpenCart 4: User Manual (2025),
Cloudflare for the Enterprise Website (2026) and
The Technical Web Guide for Marketers (2026).
Rupak has built OpenCart stores and extensions since 2010, has published more than 600 tutorials on Webocreation, and shares free OpenCart extensions on GitHub.
Find Rupak on
GitHub | Amazon | LinkedIn | X | YouTube.

Leave a Reply

Your email address will not be published. Required fields are marked *