Year-end offer: 30% off your first 6 months. Order by 31 December.

WordPress core updater security fix (CVE-2026-119977): update and lock down file writes

WordPress released a fix for a core updater security flaw tracked as CVE-2026-119977. Even after you install the update, locking down how WordPress touches files on disk prevents future updater bugs from turning into full server trouble.

Short version: update WordPress core with WP-CLI, run wp core verify-checksums to make sure no core PHP files were changed, and lock down write permissions so PHP cannot rewrite its own code.

Why core updater bugs matter to server owners

The WordPress updater downloads archives, unpacks files, and writes PHP straight into your site directory. When a vulnerability like CVE-2026-119977 affects updater validation or permissions, the biggest deciding factor on whether an attack succeeds is simple: can the web server user write to WordPress core files?

On many VPS setups, every file in /var/www/site is owned by www-data. That makes one-click dashboard updates easy, but it also means any PHP bug gets permission to alter wp-includes/ and wp-admin/.

1. Check your WordPress version and verify core files

Start by checking which version each WordPress site runs, and ask WP-CLI to compare every core file against WordPress.org checksums:

cd /var/www/your-site
wp core version --allow-root
wp core verify-checksums --allow-root

If wp core verify-checksums prints Success: WordPress installation verifies against checksums, your core files are clean. If it lists extra PHP files inside wp-admin/ or wp-includes/, inspect them right away before doing anything else.

2. Update WordPress core safely

Back up the database first, then apply the WordPress core update and database upgrade:

wp db export ../backup-before-wp-core.sql --allow-root
wp core update --allow-root
wp core update-db --allow-root
wp core verify-checksums --allow-root

Check the live front page and /wp-admin/ right after to confirm everything loads cleanly.

3. Disable dashboard file editing and PHP file writes

Most production WordPress sites should never allow administrators — or attackers using stolen admin sessions — to edit theme and plugin PHP code inside the browser. Add this line to wp-config.php above the stop editing comment:

define( 'DISALLOW_FILE_EDIT', true );

If you deploy updates from Git or WP-CLI on the server rather than clicking update in the browser, you can also block all file modifications through the WordPress admin:

define( 'DISALLOW_FILE_MODS', true );

And make sure www-data can only write inside wp-content/uploads/ and cache folders, while your deploy user owns the PHP code itself. Our step-by-step guide to file permissions and owners for PHP sites shows the exact commands.

4. Block PHP execution inside uploads

Even with a patched core, PHP files should never run inside wp-content/uploads/. In Nginx, block them inside your server { } block:

location ~* /wp-content/uploads/.*\.php$ {
    deny all;
    return 403;
}

Test and reload Nginx with sudo nginx -t && sudo systemctl reload nginx. For more WordPress checks — SSH, firewall, XML-RPC, and backups — walk through how to harden WordPress on Ubuntu and Debian.

If you manage WordPress servers with ServerNest, you see pending updates and security checks from one dashboard without SSHing into every box — Sign up to try it.

← Back to the security blog