I Love Astro. Here's Its Honest Security Bill — and the Full Scorecard Against WordPress

My journey to Astro
2026 has been the year my whole way of working changed. It started when AI vibe-coded my first site. Since then I’ve moved into AI-assisted coding and taken real charge of the systems I build with. I’ve settled on the Astro framework as the best replacement for WordPress I can find.
Astro prepares me for agentic AI workflows and the faster pace of the new website era. It’s pulled me properly into front-end development. And it leaves me genuinely free in what I can deliver. It’s been a really exciting move forward.
I’ve taken a fairly polarised stance against WordPress, and I’ve said it’s something we should move on from. A lot of that has been about security, and about the workflow it offers. The WordPress ecosystem has been both a blessing and a curse for a long time. That doesn’t mean WordPress has no merit. I just think other systems now have more going for them.
I’ve also said that Astro isn’t always the right choice, any more than WordPress is. For a five- or six-page site, going fully static is perfectly reasonable. With an agentic AI workflow you can get a lot of variety in structure, content and design even within that small scope, and a purely static site will suit most local businesses. Once a site needs more than that, Astro is where it makes sense to go.
WordPress has real pros and cons. Its biggest cons now are around agentic workflow, and static output has become the main competitive edge. Both of those are native to static and Astro setups. That’s why I offer clients Astro: a better workflow, more room to customise, and a high level of security.
But I want to stay objective. I’ve never followed the crowd in saying that vibe-coded, static or Astro sites never need maintenance. They do. This article spells out the pros and cons of an Astro site on exactly that point, compared with a well-built WordPress site.
A quick caveat on what “well-built” means. When I build in WordPress, I follow best practice: as lean as possible, as few plugins as possible, a firewall such as Wordfence, security headers, and a proactive maintenance schedule. That’s the WordPress site I’m comparing against. The Astro sites get the same level of care, as far as my experience and knowledge allow.
So let’s get down to it: here’s the truth
Astro is not maintenance-free, and it’s not rickety either. For a business website, a well-run static Astro build carries roughly half the security risk of a well-run lean WordPress build, wins on cost, and wins on how fast a business can change its content. But it moves a real chunk of risk onto the developer’s own machine and accounts, and most people leaving WordPress have never been told that.
Here’s what follows. First, where the risk actually sits. Then three scorecards comparing a lean WordPress build with two lean Astro builds: security risk, what the business gets, and cost. Finally, when each one is the right call.
The scores are my judgement, not measurements. I’ve shown every number and every assumption so you can disagree with a specific cell rather than the whole conclusion.
Where the risk actually lives
The first question to ask about any advisory is not “how bad is it?” but “where does this code run?” An Astro site has three places code runs, and they carry very different risks.
| Where code runs | What runs there | Who gets hurt if it goes wrong |
|---|---|---|
| Your machine and the build service | npm packages, Astro, Vite, Sharp, your build scripts | You: your tokens, your repos, every client you can deploy to |
| The live site | Static files on a CDN, plus any Worker or server route you added | Visitors and the client, if an endpoint is abused |
| The visitor’s browser | Any JavaScript you ship: islands, scripts, third-party tags | Visitors |
With a fully static build, Astro’s server code never ships at all. Most of the Astro advisories this year (origin-check bypasses, base-path authorisation bugs, SSRF in the remote image handler) only bite server-rendered routes. On a static site they simply don’t apply to the live site.
Vulnerable is not the same as compromised
A vulnerable dependency has a bug that someone could exploit. If it’s a build-time tool and nobody exploited it during your build, the HTML you already shipped is fine. You update before the next build. A version number doesn’t contaminate the output.
A compromised dependency is a malicious release. Its install script runs on your machine with your permissions, reads your .env, your ~/.npmrc, your SSH keys and your GitHub CLI token, and can inject script into what you build. That’s not a theory: the Shai-Hulud worm did exactly this through npm in September 2025, stealing tokens and republishing itself into its victims’ own packages. The same month, the hijack of popular packages such as chalk and debug pushed crypto-draining code that ended up in browser bundles. If this happens, an update and rebuild is not enough. You rotate every secret and audit what you shipped.
The AVIF case, done properly
In August 2026 a heap overflow in libheif, the library Sharp uses to decode AVIF images, was disclosed. Astro’s advisory rated it critical, 9.8, with the fix in Astro 7.2.8 and Sharp 0.35.4 (advisory). There is no patched 5.x release.
The bug means remote code execution on whatever machine decodes the image. On a server-rendered site with a live /_image endpoint, that’s your production server, reachable by anyone who sends a malicious image URL. On a static site it’s your build machine, and the attacker has to get a malicious AVIF into your build: through your repo, a remote image you pull in at build time, or a CMS where someone uploads images. That last one is the realistic path. A client’s stolen CMS login becomes code running in your build container, next to your secrets.
Same bug, completely different exposure. That’s the whole argument of this article in one example.
Part A: security risk assessment
The ranking: Astro (repo) is the lowest risk, Astro + Sanity is a whisker behind, and lean WordPress carries nearly double the risk of either. Lower scores are better.
The three builds being compared
All three are brochure or service-business sites, built and maintained with care:
- Lean WordPress: current core, Bricks, Wordfence, WP Optimize for caching, Rank Math and a security-headers plugin. Updated monthly, with core auto-updates on.
- Astro (repo): static output, content in Markdown in the repo, and one contact form posting to a Cloudflare Worker. Lockfile committed, release cooldown on, Dependabot alerts on.
- Astro + Sanity: the same, with content in Sanity and a webhook that triggers rebuilds. The client edits in Sanity Studio.
How each risk is scored
Every risk gets two marks out of 5, and they’re multiplied together. This is the standard way risk assessments work: something very likely but harmless, or very harmful but almost impossible, both end up mid-table. It’s the risks that are fairly likely and hurt that rise to the top.
| Mark | How likely is it? (over a year) | How bad is it if it happens? |
|---|---|---|
| 1 | Rare: almost never happens to sites like this | Negligible: a nuisance, no real harm |
| 2 | Unlikely: happens occasionally across the industry | Minor: spam or a brief outage, easy fix |
| 3 | Possible: happens regularly, could well hit you | Moderate: site defaced or down, cleanup needed |
| 4 | Likely: expect it at some point | Major: data stolen or visitors harmed |
| 5 | Almost certain | Severe: full takeover of the site, or of every client site you manage |
So a risk that’s possible (3) and severe (5) scores 3 × 5 = 15. Scores run from 1 to 25 and fall into four bands: Low 1–4, Medium 5–9, High 10–14, Critical 15–25.
The scores
Sorted by the WordPress score, highest first.
| Risk | Lean WordPress | Astro (repo) | Astro + Sanity |
|---|---|---|---|
| Site neglected for 12+ months | |||
| Attack on live application code | |||
| Admin or CMS login taken over | |||
| Malicious plugin or package release | |||
| Bad JavaScript reaching visitors | |||
| Site knocked offline | |||
| Stored data stolen | |||
| Slow to get a critical fix live | |||
| Contact form abused | |||
| Secrets leaked (API keys, tokens) | |||
| Total risk | 101 | 54 | 55 |
Astro scores worse than WordPress on the last two rows, and the same on supply chain. Here is the reasoning behind every row.
Why each row scores what it does
Site neglected for 12+ months (WordPress 20, Astro 4). Both are equally likely (4): clients stop paying for maintenance all the time. The difference is what happens next. An untouched WordPress site collects every vulnerability disclosed after its last update, and after wp2shell, attacks started within hours of the fix being published (severity 5). An untouched static site keeps serving the same safe files, and its only live code is the Worker (severity 1). This is the row that decides it for small businesses.
Attack on live application code (WordPress 15, Astro 2). Patchstack counted 11,334 new WordPress ecosystem vulnerabilities in 2025, 91% of them in plugins. A lean build still runs five plugins and a builder as live code, and Bricks had a critical takeover bug in 2024 that was exploited within days. Core isn’t immune either: in July 2026, wp2shell let attackers take over sites with no plugin and no login. So for WordPress it’s possible (3) and severe (5). A static site has no application running for anyone to attack (likelihood 1). The worst case is a hosting-platform problem, which isn’t yours to fix (severity 2).
Admin or CMS login taken over (WordPress 12, Astro 5 to 6). Every WordPress site has its login page on the public internet, and Wordfence reduces attacks rather than removing them. Possible (3), and a major breach (4). Astro’s equivalents are GitHub and Cloudflare logins behind 2FA. Those are rarely reached (1), but losing them is severe (5), because they reach every client. Sanity sits in between: client logins are more likely to be weak (2), but a taken Sanity account can only change content (3).
Malicious plugin or package release (10 on all three). Scored equal on purpose. WordPress plugin updates are a supply chain too: in 2024, several plugins on WordPress.org were backdoored through the official update channel. npm has had worms. Unlikely with good habits (2), severe if it happens (5). The difference is where it lands: on WordPress, the live server; on Astro, your laptop and your tokens.
Bad JavaScript reaching visitors (WordPress 9, Astro 6). WordPress plugins and builders load their own scripts, often on every page, and cross-site scripting in plugins is one of the most common WordPress bug types. Possible (3). A static Astro site ships only the JavaScript you choose, often none, so it’s unlikely (2). Both share the same weak spot, third-party tags like analytics and chat widgets, and both can harm visitors (3).
Site knocked offline (WordPress 9, Astro 2). WordPress runs PHP and a database for anything the cache doesn’t serve, so floods of requests to the login page or XML-RPC can take the server down. Possible (3), moderate (3). A static site is served from the CDN’s edge, which is built to absorb that traffic. Rare (1), minor (2).
Stored data stolen (WordPress 8, Astro 2). WordPress keeps user accounts, password hashes and often every form submission in a database on the live server. Unlikely on a lean build (2), but major if it happens (4). The static builds store nothing on the site: the Worker passes enquiries straight to your inbox. Rare (1), minor (2).
Slow to get a critical fix live (WordPress 8, Astro 6). WordPress’s best card: forced auto-updates pushed the wp2shell fix to sites the same day it was disclosed. But a site compromised before the fix landed stayed compromised (2 × 4). Astro updates are per repo, rebuilt and redeployed, so they’re slower. Most Astro advisories don’t touch a static site’s live files, though, so the delay rarely matters (2 × 3).
Contact form abused (WordPress 6, Astro 9). Astro is worse here. Mature WordPress form plugins have years of scrutiny across thousands of sites. Unlikely (2). Your Worker is custom code nobody else reviews. Possible (3). The harm is the same for both: spam, fake leads or your domain used for phishing (3). Built to the security checklist, the Worker drops to about 6.
Secrets leaked (WordPress 4, Astro 8). Astro is worse here too. WordPress keeps its keys in one config file on the server. Rare (1). Astro spreads them across .env files on your machine, build environments and Worker secrets, and one mistake with a PUBLIC_ prefix or a committed .env ships a key to the world. Unlikely (2). Either way, a leaked key is a major problem (4).
Part B: what the business actually gets
Security is half the story. A website is a business tool, and the pace has changed: search is shifting, AI answers are eating clicks, and a business that publishes, tests and reworks pages every month beats one that launches a site and leaves it. So the second question is which stack lets a business change its content fastest and most safely, with AI in the loop.
The ranking: Astro + Sanity gives the business the most, then Astro (repo), then lean WordPress. Each factor is scored out of 5, and higher is better: 5 Excellent, 4 Good, 3 Fair, 2 Weak, 1 Poor.
| Factor | Lean WordPress | Astro (repo) | Astro + Sanity |
|---|---|---|---|
| Building new pages and sections with AI | |||
| AI content pipeline (data → draft → review → publish) | |||
| Client and marketer editing experience | |||
| Separation of roles (developer, admin, editor, marketer) | |||
| Content portability and ownership | |||
| Performance by default | |||
| Version control, preview and rollback | |||
| Skill floor, talent pool and handover | |||
| Off-the-shelf features (shop, memberships, bookings) | |||
| Total (out of 45) | 27 | 35 | 36 |
The honest notes
AI page building (2 / 5 / 4). In a repo, a page is a file the agent writes, using your components, which you review as a diff. In WordPress with Bricks, AI works through the builder’s own tools or add-on plugins: useful, but bounded by what the builder exposes, and the output is builder data rather than code you can read. Sanity loses a point because a brand-new page type needs schema work from a developer.
AI content pipeline (3 / 5 / 5). WordPress can be driven by agents. Its REST API is part of core, and since 6.9 the Abilities API plus an official MCP adapter plugin let agents like Claude act on a site. I haven’t used the adapter myself, so this score is for what it does on paper, not for how it feels in use.
Two things hold it back. First, every change the agent makes lands directly on the live production site, through an endpoint and a stored login that can change it. Second, builder layouts are stored as builder data, so building pages with AI means going through the builder’s own tools rather than writing components directly.
On Astro, the agent works in a repo or in Sanity drafts. It adds nothing to the live site’s attack surface, and a human approves every change before it ships.
Client editing and roles (WordPress 3 and 2, repo 4 and 2, Sanity 5 and 5). WordPress does have roles: Editors can’t touch plugins, and Bricks has an “Edit content” mode that locks layout and styling. The trouble is that it’s two editing systems. Bricks pages are edited in Bricks, while posts, SEO fields and the rest of the dashboard live in Gutenberg and wp-admin, so clients jump between two views. Edits don’t flow between them either: once a page has Bricks data, changes made in Gutenberg don’t update it. WordPress roles and Bricks permissions overlap, so there’s always a permission you didn’t mean to grant, or a screen the marketing team shouldn’t see.
A repo-only site used to mean the client couldn’t fix a typo without you. That’s no longer true. Plenty of clients are happy to make changes by asking an AI agent connected to the repo, and every change still comes through as a reviewable pull request. For clients who want a visual editor, Git-based CMSs such as TinaCMS and Keystatic sit on top of the repo and give them one. It scores Good rather than Excellent because one of those has to be set up; with neither, the client is back to waiting for you.
Sanity with a page-builder array is the cleanest version of all. Editors build full pages from approved components and edit content and SEO in one dashboard. They never touch design or code, and the permission line is exactly where you draw it.
Content portability (2 / 5 / 4). Bricks layouts are stored as builder data in the WordPress database, so leaving the builder means rebuilding pages. Markdown in a repo is plain text you can take anywhere. Sanity content is structured JSON you can export, but it lives on Sanity’s platform, so it drops a point.
Performance by default (3 / 5 / 5). A lean Bricks build with caching can be fast, but it takes tuning and works against every plugin’s scripts. Astro ships static HTML and no JavaScript unless you add it, so fast is the starting point.
Version control, preview and rollback (2 / 5 / 4). WordPress has revisions per post and staging tools, but no history of the whole site. In a repo, every change is a commit you can preview and roll back. Sanity keeps document history and the code stays in Git, but content and code are versioned in two places.
Where WordPress wins outright. Skill floor and ecosystem. Any agency can take over a WordPress site, and WooCommerce, memberships, LMS and booking plugins exist off the shelf. For a shop or a membership site, these two rows outweigh everything else in this table. For a service business’s brochure site, they barely matter.
The AI content workflow, and how to keep it safe
This is the part I’m most excited about. An agent watches the data, proposes the content the site is missing, drafts it, and a human approves it before it goes live. On Astro it works today, on both the repo and Sanity setups.
- Observe. An agent reads Google Search Console and Analytics: queries with impressions but no clicks, pages slipping in position, services with no page.
- Propose. It suggests specific blogs or service pages, with the reasoning and the data behind each one.
- Draft. It writes the content using your existing components (repo) or your existing schema (Sanity).
- Review. A human approves it. In a repo that’s a pull request with a diff and a preview deploy. In Sanity it’s a draft the client or marketer reviews in Studio with live preview.
- Publish. Merge, or press Publish in Sanity. The site rebuilds and deploys.
Correcting a common assumption: Sanity is not harder for this than a repo. Its API makes “create a draft, a human publishes” the natural flow, and for client-run sites it’s the better review gate, because the person approving doesn’t need GitHub. WordPress can also be driven by agents through its REST API and the MCP adapter. What it lacks is the clean review step: an agent writing into a live database is a different risk from an agent opening a pull request.
The security rules for an AI pipeline
- The agent drafts, a human publishes. No token the agent holds can merge to
mainor publish in Sanity. - Scope every token to one site and the minimum permission. A GitHub fine-grained token for one repo with pull-request access. A Sanity token that can write drafts only.
- Analytics access is read-only.
- Treat fetched content as untrusted. Pages, search results and competitor copy the agent reads can carry instructions (prompt injection). The review step is what stops them reaching the live site.
- Images the agent sources get downloaded, checked and committed, never hotlinked into the build. That’s the AVIF lesson.
Part C: cost
The ranking: Astro (repo) is the cheapest to run, then Astro + Sanity, then lean WordPress. Same scale as Part B, where higher means cheaper or better value: 5 Excellent, 4 Good, 3 Fair, 2 Weak, 1 Poor. These are relative scores, not quotes, because prices vary too much by host and plan to put a single figure on them.
| Cost factor | Lean WordPress | Astro (repo) | Astro + Sanity |
|---|---|---|---|
| Hosting per site | |||
| Licences and subscriptions | |||
| Monthly maintenance time | |||
| Initial build cost | |||
| Cost of change over a year (new pages, content) | |||
| Total (out of 25) | 13 | 24 | 22 |
WordPress needs PHP and database hosting, usually managed hosting per site, plus builder and premium plugin licences. Static Astro sits on a CDN free tier for most small sites. Sanity has a free tier that small sites fit in, with paid plans as editors and usage grow.
Maintenance time follows the risk picture. A WordPress site needs core, theme and plugin updates checked every month, plus the occasional update that breaks the builder. A static Astro site needs a monthly audit and a quarterly dependency update, and the live site doesn’t change in between.
The initial build is where AI has changed the picture most. With an agent, an Astro site with multiple page types, content collections or Sanity schemas can be built and deployed in a couple of hours. Nothing comparable happens in WordPress, where the builder, plugins and settings are still assembled by hand. WordPress with Bricks and a template is still quick for a skilled builder, so it keeps a Good. Astro then keeps that advantage after launch, in the cost-of-change row, which is the one that compounds.
The final scorecard
Static Astro wins overall by about eight points out of 30. Repo-only edges Sanity on cost, and Sanity wins on what the business gets. Each part is converted to a score out of 10 so the three can be added up:
- Security: (250 − risk total) ÷ 25
- Business: total ÷ 4.5
- Cost: total ÷ 2.5
| Part | Lean WordPress | Astro (repo) | Astro + Sanity |
|---|---|---|---|
| A. Security (risk 101 / 54 / 55) | 6.0 | 7.8 | 7.8 |
| B. Business (27 / 35 / 36) | 6.0 | 7.8 | 8.0 |
| C. Cost (13 / 24 / 22) | 5.2 | 9.6 | 8.8 |
| Total (out of 30) | 17.2 | 25.2 | 24.6 |
The security conversion is deliberately conservative: measured against the worst possible score, it compresses the gap. In raw risk, WordPress carries almost twice the risk of either Astro build (101 against 54 and 55).
When WordPress is still the right call
- A shop, a membership site, a course platform or bookings. The plugin ecosystem is the product, and Part B’s last two rows decide it.
- The client needs any agency on earth to be able to take it over.
- There’s nobody to own the build process. If no one will secure the laptop, the tokens and the Worker, a well-managed WordPress host with auto-updates is safer than a neglected npm setup.
When Astro is the right call
A service business that needs a fast site, keeps changing its content, wants AI in its content workflow, and would rather the live site did as little as possible. Repo-only suits sites the developer runs for the client, or clients happy to edit through AI or a Git-based CMS. Astro + Sanity suits sites the client’s own team edits.
Sources
- Astro: remote code execution through AVIF image optimization (GHSA-26w7-cxv4-gfx2)
- Patchstack: State of WordPress Security in 2026
- Wordfence: wp2shell aftermath, the first critical unauthenticated WordPress core RCE in nearly a decade
- WordPress Developer Blog: introducing the WordPress MCP Adapter
- pnpm 10.16 release notes: minimumReleaseAge
- Vercel: reproducing, disclosing and fixing the libheif vulnerability