Opens in a new tab

Independent WordPress hosting guides · Recommended host: Convesio

Start a free trial →

AI-Written Code and CVEs: Securing a Vibe-Coded WordPress Plugin

Researchers are now counting security flaws in AI-written code, and the UK cyber agency has warned about unsupervised vibe coding. A checklist for securing any AI-written WordPress plugin or snippet.
By Shahzad Hasan · November 18, 2026

In March 2026 a Georgia Tech tracker reported 74 confirmed security vulnerabilities (CVEs) attributed to AI-written code, and the UK’s National Cyber Security Centre warned that vibe coding without oversight carries real security risk (Vibe Coding Weekly #26). The researchers called the count a lower bound.

Figures and claims about other companies are as reported at the time and summarised by Vibe Coding Weekly; check the original announcement before relying on them.

Why WordPress code is exposed

A small plugin or snippet in functions.php runs with full access to your site. AI tools often produce code that works but skips the boring security steps WordPress expects.

Checklist for any AI-written plugin or snippet

  1. Input: every value from a form, URL or request is sanitised (for example sanitize_text_field, absint).
  2. Output: everything printed is escaped (esc_html, esc_attr, esc_url).
  3. Database: queries use $wpdb->prepare, never string concatenation.
  4. Permissions: actions check current_user_can with the right capability.
  5. Nonces: forms and AJAX requests verify a nonce.
  6. REST routes: each has a real permission_callback, not one that always returns true.
  7. Files: uploads check type and size; no user input in file paths.
  8. Secrets: no API keys in the code.

How to use AI to help

  • Ask a second AI session to review the code against this list, without seeing the first session’s reasoning.
  • Run a plugin security scanner and the WordPress coding standards checker.
  • Read the code yourself before activating it on a live site.

See Vibe coding a small WordPress plugin and Reviewing AI-written code.

Source: Vibe Coding Weekly #26. This article is our own take for WordPress and Bricks builders; it does not reproduce the newsletter.

In this article

Need hosting that scales?

Convesio runs each site in Docker containers with auto scaling and load balancing built in.
Try Convesio free →
Affiliate link: we may earn a commission at no extra cost to you.