The 10 most common web vulnerabilities, how to prevent them and what to watch for when coding with AI

The 2025 OWASP Top 10 in plain language: what each risk is, how to prevent it and why vibe coding, building software by asking an AI for the code, means checking exactly those points before you launch.

By , Full stack developer

A prompt to an AI assistant that generates code with one line flagged as vulnerable, next to the list of the ten OWASP risks with two of them on alert
On this page

Today you can have a working web app in an afternoon without writing a single line of code: you describe what you want to an artificial intelligence assistant and it builds it. This way of working is known as vibe coding, and it’s a great tool for prototypes and for testing ideas. The problem shows up when that prototype goes live with real customer data, because AI tends to make, over and over, the same security mistakes that have topped the web’s most-common list for twenty years.

This article walks through that list, the 2025 OWASP Top 10, explains how to prevent each risk and closes with the specific precautions worth taking when the code is written by an AI. If you’d like to start with the basics, this article explains what a vulnerability is and why a website needs maintenance.

What is the OWASP Top 10?

OWASP (Open Worldwide Application Security Project) is a nonprofit foundation that publishes open guidance on application security. Its best-known document is the Top 10: the list of the ten most important risk categories in web applications, which the industry uses as a starting point for audits, contracts and training.

The 2025 edition, the eighth, was presented in November of that year. It was built from test data on more than 2.8 million applications, contributed by security testing and code analysis companies, plus a survey of practitioners. It adds two new categories and one merger compared with the 2021 edition.

What are the 10 most common web vulnerabilities in 2025?

1. Broken access control

It tops the list for the second edition in a row. It happens when the application doesn’t properly check what each user is allowed to do: someone changes a number in the address (/invoice/1024 to /invoice/1025) and sees another customer’s invoice, or a regular user reaches the admin panel because the button was hidden but the page wasn’t protected. In 2025 this category also absorbed server-side request forgery (SSRF), which used to stand alone: tricking the server into requesting internal addresses that no outsider should be able to reach.

How to prevent it: deny by default and allow only what’s needed, check permissions on the server on every request (never rely on what the interface hides) and verify that each record belongs to whoever asks for it.

2. Security misconfiguration

It climbed from fifth to second place. It covers default passwords nobody changed, debug modes left on in production that reveal internal details, browsable folders, cloud services open to the public and missing security headers.

How to prevent it: a reviewed, repeatable production configuration with no sample accounts or features, plus regular checks. HTTP security headers are an easy part to measure: our security headers checker gives you a grade in seconds.

3. Software supply chain failures

This one is new and expands the old “vulnerable and outdated components” category. A modern website is mostly made of third-party pieces: libraries, plugins, themes, container images. If one of them has a flaw, or someone manages to slip malicious code into one, the problem becomes yours. The community voted it one of its top concerns.

How to prevent it: know which components each project uses and in which version, install only from official sources, update methodically and remove what you no longer use. On WordPress, the WordPress security scanner checks the visible core, theme and plugins against public vulnerability databases. The critical PHP and Node.js vulnerabilities from October are a good example of why this matters.

4. Cryptographic failures

Sensitive data that travels or is stored unencrypted, passwords stored with outdated methods, keys written into the code itself or misconfigured certificates.

How to prevent it: HTTPS across the whole site, passwords stored with algorithms designed for the job (bcrypt, scrypt or Argon2), encryption of sensitive data in the database and keys kept out of the code, in a secrets manager.

5. Injection

The classic: the application mixes what the user types with a command to the database, the system or the page, and the attacker uses that mix to run their own instructions. This covers SQL injection and cross-site scripting (XSS), where code is slipped in that runs in other visitors’ browsers.

How to prevent it: parameterized queries instead of building commands by pasting text together, validating input against what’s expected, escaping output based on where it’s rendered and a content security policy (CSP) that limits which scripts can run.

6. Insecure design

This isn’t a coding error but a planning one: a password recovery process that can be guessed, a store that lets the same coupon be applied a hundred times, a form with no submission limit. However well it’s coded, a design like that is still vulnerable.

How to prevent it: think about abuse from the start, asking for each feature how someone with bad intentions would use it, set usage limits and review sensitive flows (payments, accounts, permissions) before building them.

7. Authentication failures

Anything that lets someone pose as someone else: logins with no limit on attempts, weak or leaked passwords accepted without question, sessions that never expire or stay alive after logging out.

How to prevent it: two-factor authentication, attempt limits, rejecting passwords that already appear in known breaches (you can check yours with our pwned password checker) and sessions that truly expire and get invalidated. If you’d rather not manage your own passwords, an established identity provider is usually a better option than building it from scratch.

8. Software or data integrity failures

The application trusts code or data without checking that it hasn’t been tampered with: updates downloaded without verifying their signature, scripts loaded from third-party servers without control, or data the user can manipulate that the server accepts as valid.

How to prevent it: verify signatures and checksums, use subresource integrity (SRI) on external scripts, protect the deployment process so only authorized people can ship changes and don’t trust data that comes from the browser.

9. Security logging and alerting failures

If nobody records what happens and nobody gets a warning when something goes wrong, an attack can go on for months unnoticed. The category was renamed in 2025 to stress that logging isn’t enough: someone has to find out.

How to prevent it: log sign-ins, access failures and administrative actions, keep those logs out of an attacker’s reach and set up alerts that reach a person.

10. Mishandling of exceptional conditions

The other 2025 newcomer. It groups what happens when something goes wrong and the application didn’t plan for it: errors that reveal internal paths or database details, operations left half done that leave inconsistent records, or systems that “open the door” on failure instead of closing it.

How to prevent it: catch errors, show users generic messages and keep the details only in the internal log, roll back incomplete operations and, when in doubt, fail safely: if a permission can’t be checked, it’s denied.

What does vibe coding have to do with all this?

A lot, because AI learns from huge amounts of public code, and public code is full of these same mistakes. The data from recent months all points the same way:

  • Nearly half of generated code has flaws. In its July 2025 study, Veracode tested more than 100 AI models on 80 coding tasks: in 45% of cases the code introduced vulnerabilities from the OWASP list. The models failed to defend against XSS in 86% of the tests, and the company’s conclusion is that they generate increasingly correct code, but not more secure code.
  • AI-attributable vulnerabilities are already showing up in public databases. A Georgia Tech team built a radar that tracks published security advisories and searches each project’s history to see whether the bug was introduced by an AI tool. According to its April 2026 update, it had 74 confirmed cases, 14 of them critical, and the trend is speeding up: about 18 in the second half of 2025 versus 56 in the first quarter of 2026.
  • Apps built on vibe coding platforms ship with secrets in plain sight. The security company Escape analyzed more than 5,600 public applications built with these platforms and found over 2,000 vulnerabilities, more than 400 exposed keys and secrets and 175 cases of accessible personal data, including medical records and bank account numbers.
  • A single forgotten setting can open the whole database. In 2025, vulnerability CVE-2025-48757, rated 9.3 out of 10, was recorded in apps generated by the Lovable platform: the rules deciding which database rows each user can see were insufficient, and anyone, without signing in, could read or modify tables. That’s risk number 1 on the list, broken access control, at scale.
  • An agent with too many permissions can delete what it shouldn’t. In July 2025, the founder of SaaStr described how Replit’s AI agent deleted the production database during a period when it had been told not to touch anything. Replit responded by separating development and production databases by default.

There’s also a risk specific to AI that falls under the supply chain category: made-up packages. A study presented at USENIX Security 2025 analyzed more than two million library recommendations from 16 models and found that almost 20% pointed to packages that don’t exist. Many of those fake names repeat predictably, so an attacker can register them with malicious code and wait for someone to install them on the AI’s advice. This technique is called slopsquatting.

What precautions should you take when coding with AI?

None of this means you should stop using AI, which saves a lot of work when used well. It means treating what it produces as what it is: a first draft. As the Georgia Tech researcher cited above puts it, if you’re shipping AI output to production, review it the way you’d review a junior developer’s work, especially anything around input handling and authentication.

  1. Tell the prototype apart from the product. To test an idea, go ahead. Before you put in real customer data, payments or personal information, the code needs a security review by someone who knows what to look for.
  2. Ask for security explicitly. AI does what it’s asked. If your instruction includes “validate input on the server,” “use parameterized queries” or “check that the user owns the record,” the result improves. If you don’t ask, it usually won’t be there.
  3. Check permissions yourself. Sign in as an unprivileged user, change identifiers in the address, call the API directly without going through the interface. On platforms with a built-in database, confirm that row-level access rules exist and that they work, not just that they’re turned on.
  4. No keys in browser code. API and database keys belong on the server, in environment variables or a secrets manager. Anything that reaches the browser can be read by anyone.
  5. Check every dependency before installing it. Make sure it exists in the official registry, has a history, maintenance and reasonable downloads, and that the name is spelled right. If the AI suggests a library you don’t know, look it up first.
  6. Limit what the agent can do. Work in a development environment separate from production, with backups that can be restored (and have been tested), and review changes before applying them. An assistant should never have permission to delete the real database.
  7. Run automated tools, but don’t stop there. Code and dependency scanners catch many of these flaws and are worth building into every release. Design and permission mistakes, on the other hand, still need human review.
  8. Look at your site from the outside. What an attacker sees starts with what’s public: headers, visible technologies and versions, forgotten subdomains. Our free tools let you check several of those things in minutes.

Where should you start?

If your website or app is already live, start with what you can measure today: security headers, the versions of what you use and who can get into each part. If it was built with help from an AI, add a permissions and secrets review before any other improvement.

That ongoing follow-up is the work of our support and evolution service: watching the security advisories for what you use, applying updates methodically and reviewing changes before they go live, including the ones an AI writes. If you have a vibe-coded prototype and want to know whether it’s ready for real customers, get in touch and we’ll review it with you.

Next step

Shall we talk about continuous support & evolution?

Tell us your case and we come back with a first read on scope within one business day.

What happens next

  1. You tell us about the projectA short form, no strings attached.
  2. We reply within one business dayWith a first read on scope.
  3. Scoping call and proposalWe set it up by email and send you the proposal.

We reply within one business dayBogotá · UTC−5

Message us on WhatsApp (opens in a new tab)
Esc

↑ ↓ moveEnter openSee all tools →