• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

Resolved CVE-2026-42945 Nginx Rift and older Wordpress Toolkit heads up

rhall

New Pleskian
Server operating system version
Centos 6.10
Plesk version and microupdate number
18.0.31
A PSA for anyone running older releases of Plesk with nginx, and older releases of Wordpress Toolkit (wp-toolkit) like: 5.8.1-5837.

I was auditing one of my older systems today for any rewrites that are vulnerable to the brand new nginx CVE-2026-42945 published a few hours ago today, that can result in a remote take over. More details here:

My system's nginx is vulnerable to this exploit, but I am somewhat safe as I already has kernel.randomize_va_space (ASLR) set to 2 for full randomization, which makes it harder, but not impossible to exploit. I did want to fully remediate but cant upgrade nginx, and I did find a few places where I was exposed with rewrites vulnerable as described in the CVE and the article above. They were easy to fix but the PSA is, older versions of WP-TOOLKIT are what kept injecting these vulnerable rewrite directives when the "enable hotlink protection" is checked and if you have "Block author scans" checked or enabled in the security audit. Any Wordpress instance that has completed the security status and mitigations, or has that checkbox enabled, that domain will get unsafe rewrites added anytime the configurations are re-generated or applied as long as it's checked. This includes other tools that regenerate like plesk repair web -domains-only -y, adding additional nginx or apache directives, /usr/local/psa/admin/bin/httpdmng --reconfigure-server, etc., etc.

Editing some of the templates and adding overrides can help, but if you want to leave those features on, they will keep injecting a vulnerable rewrite that is hardcoded into WP-Toolkit.

I fixed this partially by creating an override here:
/usr/local/psa/admin/conf/templates/custom/domain/nginxDomainVirtualHost.php

That looks for and fixes the rewrites by injection additional code at the tail end. This seemed to get most of it, but when I would regenerate things some still seemed to get through.

In the end what fixes things for me what to create a custom bash script that sanitizes those things across all of /etc/nginx/plesk.conf.d/vhosts conf files and the system files, checks the config for errors with nginx -t, and then reloads its. I trigger this with the Event Manager and the Physical Hosting updated event which fires the script. It waits a few seconds to make sure Plesk is finished, then does its thing to fix the rewrites (and looks for others that may have slipped in) and restarts nginx. I kick it off by just adding some blank comments to the nginx directive and applying that to trigger things. This is good enough for my needs. One other note, wp-toolkit will customize the injection rules based on the path where your Wordpress installation url starts - so you need to account for that as well to make sure you fix the rewrite rules properly if you follow my example. Here is that script with some of the custom elements of my environment left out, you may need to customize, especially if any of your Wordpress installs are not at the base path of your url:

(Too large for forum post or some other validation rule, so added this to pastebin as well):

I have no plans to create new domains on this older system, especially Wordpress that would be impacted by the older version of WP-Toolkit injecting the vulnerable rewrites, so Im not worried about forgetting this or introducing it with a new domain, just wanted to make sure I am covered for now and when I make changes/regenerate the configs.

I am hesitant to share all testing and remediation scripts that are tailored to my old creaky system, just mainly wanted to give a heads up that not only is this lurking in older systems, but you may not even be aware of them unless you manually check. For anyone who needs a head start, here is one small bash script that should help scan and identify flawed rewrites in nginx configs - adapt to your pathing and needs as necessary:

This first two line bash, will find vulnerable nginx rewrite rules across the main areas the directives woulds be found:
Bash:
find /etc/ /var/www/vhosts/system/ /usr/local/psa/ /etc/nginx/plesk.conf.d/ /etc/nginx/plesk.conf.d/ip_default/ -type f \( -name "*.conf" -o -name "*.ini" -o -name "*.php" \) -print0 2>/dev/null | \
xargs -0 grep -E -n 'rewrite[[:space:]]+.*[?].*' 2>/dev/null | grep -v '(?<'

For this second larger script it also wouldn't fit here or allow it as an attachment, so I shared it to pastebin:

That bash script creates a dump/reconstruction of your overall nginx config (pulling it from memory with nginx -T wasn't working well on my system, hence this method) and then scans the resulting file for rewrites and then presents them to you with the vulnerable lines and then removes the temporarily created nginx config dump.

More specifically, it performs structural state analysis on the .conf file. Standard Linux utilities like grep cannot look ahead across multiple multi-line scoping blocks cleanly, so this script acts as a parser. It scans config paths, isolates blocks, tracks the scope state, and explicitly flags files containing vulnerable combinations (rewrite with ? AND an accompanying rewrite/if/set statement).

You might get some false positives, for example the fake-hotlink-stub rewrite that wp-toolkit also injects, looks flawed but it's not really vulnerable. The replacement target is a completely static, plain text string: "/fake-hotlink-stub". Because it lacks a ? delimiter, nginx does not trigger the argument length miscalculation logic, however the scanner script will flag it because it does have the (?:/) which the scanner is looking for. Anyway, hopefully it will help folks not get stung by this one, there were already too many vulnerabilities this week for nginx and others.... I imagine this might still be helpful for newer releases of wp-toolkit too if its still using the same rewrite lines that are vulnerable and need to be revised to replace unnamed positional captures with PCRE named captures.

AI discovery of bugs, flaws, exploits, is only going to rapidly accelerate - it's only gonna get worse fast - we can only hope for responsible disclosure, but we cant certainly cant count on that... Stay frosty muchachos! :)
 
Hello @rhall!
Thank you that pinged us about this vulnerability. Plesk security team aware about the situation and investigating the issue.
 
It's unbelievable that Plesk takes 5 days to release a patch for a critical bug...

The sw-nginx mantainer is on vacation ?
 
For your info: the plesk-patch is now released.
Note here, trying since noon. Neither plesk installer --select-release-current --upgrade-installed-components offers a download, nor has the FAQ article been updated that a patch has actually been published. What am I missing?
18.0.77 #2 on Alma
 
Last edited:
Note here, trying sind noon. Neither plesk installer --select-release-current --upgrade-installed-components offers a download, nor has the FAQ article been updated that a patch has actually been published. What am I missing?
18.0.77 #2 on Alma
Did you try plesk-installer --select-release-id PLESK_18_0_78 --upgrade-installed-components ? That worked for us on Ubuntu. The link provided in the faq did not work.
 
I am assuming there will be no patched nginx releases for older unsupported versions of Plesk like 18.0.31. and that it will only go back to 18.0.76 or so?

However, I am curious if there will be updates to WP-toolkit going back to version 5.8.1-5837 (which was forked at that final release version for 18.0.31), or is that also unsupported?

Just curious more than anything, since I am unclear if this patch or update for newer supported releases is fixing just the nginx binary, or is it also fixing the vulnerable rewrites that WP-Toolkit applies as part of the Wordpress hardening options. I am unclear if those rewrite directives were updated or fixed already to be safe in a subsequent release of WP-toolkit beyond 5.8.1-5837, or if that is also part of the expected patch releases? And if nginx is fixed, I am assuming those rewrites no longer matter if that is the case, so there wont actually be any changes to also eliminate any other config generators, templates, overrides, etc. embedded anywhere in Plesk tools/extensions to also replace rewrite directives from positional captures to PCRE named captures to eliminate the aspect of the CVE that can inflict the most damage. Is that a fair statement, or am I off base.

Just looking for some clarity on the approach given the severity and ramifications of this specific CVE.

Thanks for any clarifications that can be provided!
 
@rhall , I believe the update will be applied only to 18.0.77 and 18.0.78. It's very unlikely for our team to patch a version as old as .31 or even .67. The update is specifically about the underlying NGINX vulnerability tied to CVE-2026-42945. There won't be a specific patch for WP Toolkit, so the version is irrelevant. If Nginx itself is patched, those rewrite directives should no longer be exploitable in the same way.
 
Just a heads up, in case anyone missed the notice in the changelog, that the security update was also released for Plesk Obsidian 18.0.77. Please let us know if you encounter any issues.
 
Back
Top