About the author
StephanieRing
Stephanie Ring Director of Web Development

TL;DR: More website code is written by AI, and independent testing in 2026 found that about 45% of that code contains a security flaw. The site still looks and works fine, so a flaw can sit unnoticed until someone exploits it, which is why a little oversight goes a long way. What marketing leaders should know:

  • The models aren’t getting safer on their own. AI is no better at writing secure code than it was two years ago, so human oversight is still the safeguard.
  • A “code freeze” needs access controls. AI tools can ignore an instruction not to touch the site. A freeze only holds if the AI’s access to the site is turned off.
  • Human review is where the value is. A person checking AI’s work before it goes live is what keeps your site safe.

AI-generated code creates new website security risks for marketing teams

A code freeze used to be simple. Before a campaign launch, you told the team not to change the site until it was over. It worked because everyone with access to the website understood why the freeze existed and chose to honor it.

A growing share of website code is now written by AI, which doesn’t know why a freeze exists or what your team’s rules are. AI works to finish the task it was given, so a rule in a document is only a suggestion.

A developer used to write code and understand it because they wrote it. Now AI produces code faster than anyone can read, and the reviewer is often the only human who looks at it closely.

That matters because a site built on unreviewed code can look like it’s working perfectly, which is why a strong review step is so valuable.

Research shows AI-written code still carries significant security risks

Veracode’s 2026 GenAI Code Security Report found that about 45% of the code produced by more than 100 AI models contained a known security flaw. That number has barely moved in two years.

The most relevant number for marketers involves forms, landing pages, and anything else visitors can type into. When AI builds features like these, 85% contain a flaw that lets an attacker run their own code on your page. That kind of attack, called cross-site scripting, is one of the most common ways a marketing site can be turned against its own visitors, and careful review is how teams catch it.

A separate study of AI-written code that developers had kept and published found flaws in about a quarter of it. The studies aren’t directly comparable, but the lower rate is consistent with what you’d expect when people check the work.

Four questions to ask your web team about AI and website security

You don’t need to read code to ask these questions, and a good team will have clear answers.

  1. Do you check add-ons that AI suggests? Websites are built partly from ready-made add-ons, like plugins and code libraries. AI can recommend an add-on that doesn’t exist, and attackers have started publishing malicious add-ons under those made-up names. Checking that an add-on is real and established takes seconds.
  2. Do add-ons update themselves? If they do, a compromised update could reach your site without anyone on your team making a change. Updating on purpose, with a record of what changed, keeps you in control.
  3. How do you scan for security problems? Security scanning tools each catch different things, so a clean report from one tool tells you what that tool found. Look for more than one kind of scan, with automated alerts for every site.
  4. Does a person read every AI change before it goes live? AI-written code looks tidy and professional, which makes it easy to approve without a close read. A careful reviewer checks what the code does, including anything it changed that nobody asked for.

When AI makes website changes on its own

AI agents can make changes to your site directly without a person approving each one.

Here are three things to keep in mind:

  1. Lock down access during a freeze. A well-known example is the July 2025 Replit incident, in which an AI agent told to freeze all changes deleted a company’s live database anyway. The lesson is simple: if something must not change, keep the AI’s access to it turned off.
  2. Ask for the full list of changes. When an AI agent finishes a task, it writes a summary of what it did. Summaries are usually accurate, but agents can also make changes nobody asked for, and the full change history is what shows all of them.
  3. Expect AI to take the shortest path. AI agents are usually judged on whether automated checks pass, and they can take shortcuts to get there. SpecBench, a 2026 study of AI coding agents, found they could pass every visible check while failing hidden ones. In one case, an agent passed by memorizing the expected answers.

On a website, the quickest way to make a stubborn problem go away is often to remove a safeguard, like the check that blocks bad input on a form or the rule that controls who can edit a page. The site keeps working without the protection.

Large AI-generated changes can make security vulnerabilities harder to spot

AI can update 90 files in seconds. When a person is asked to review that many changes at once, it’s natural to skim, and researchers who study AI incidents call this approval fatigue.

If 88 of those 90 changes are correct, the two bad ones look just like the rest. An AI change might weaken a form safeguard or loosen access to part of your site. The page still looks fine and passes visual checks, so a problem can go unnoticed until it causes damage. A great question for your web team is how they review large AI changes.

The fix is in your process

Our team uses AI daily, and it has made us faster in ways we wouldn’t give up. We put part of the time it saves back into reviewing its work and checking security before anything goes live. That’s the standard to expect from whoever builds your site.

AI doesn’t need to be the problem. The problem is letting speed replace smart oversight. A strong website development process makes room for both: using AI where it makes sense, while keeping people responsible for reviewing code, protecting your site, and making sure nothing gets implemented just because “it works”.

Building or updating your website? Envisionit’s web development team combines AI-powered efficiency with the human oversight needed to keep your site secure, reliable, and ready to grow.

Get in touch to talk about your next website project.

Let's talk

"*" indicates required fields

This field is for validation purposes and should be left unchanged.