SECURITYHIGHCVE-2026-87909

WP Photo Album Plus RCE Lets Subscribers Hijack ImageMagick Commands

CVE-2026-87909 (CVSS 7.5) lets Subscriber-level WordPress users achieve RCE in WP Photo Album Plus via unsanitized filenames passed to ImageMagick.

Dylan H.

Security Team

September 19, 2026
4 min read
WP Photo Album Plus RCE Lets Subscribers Hijack ImageMagick Commands

Affected Products

  • WP Photo Album Plus Plugin ≤ 9.2.09.002

Executive Summary

A high-severity remote code execution vulnerability (CVE-2026-87909) has been disclosed in WP Photo Album Plus, a WordPress photo gallery plugin with roughly 10,000 active installations. Rated CVSS 7.5, the flaw lets authenticated attackers with Subscriber-level access or above execute arbitrary code on the server through the plugin's wppa_image_magick function.

CVSS Score: 7.5 (High)

The vulnerability stems from insufficient sanitization of the multipart upload filename before it is concatenated into an ImageMagick command string executed via exec(). The plugin only applies escapeshellcmd() to the whole command rather than quoting individual arguments — which escapes shell metacharacters but does not stop argument injection, since spaces still act as argument separators. Compounding the issue, filename sanitization applied at the database layer is never applied to the physical temporary file path actually handed to ImageMagick.


Vulnerability Overview

AttributeValue
CVE IDCVE-2026-87909
CVSS Score7.5 (High)
CWECWE-74 (Improper Neutralization of Special Elements in Output Used by a Downstream Component)
TypeAuthenticated Argument Injection → RCE
Attack VectorNetwork
Privileges RequiredSubscriber-level account or above
Affected Functionwppa_image_magick()

Affected Versions

PluginAffected VersionsFixed Version
WP Photo Album Plus≤ 9.2.09.0029.3.01.003

Attack Vector

1. Attacker registers or obtains a Subscriber-level WordPress account
2. Attacker uploads an image with a crafted multipart filename containing shell argument syntax
3. Plugin sanitizes the filename for database storage, but NOT the physical temp file path
4. wppa_image_magick() concatenates the unsanitized filename into an ImageMagick exec() command
5. escapeshellcmd() escapes metacharacters but does not prevent argument injection via spaces
6. Injected arguments are interpreted by ImageMagick's command-line processing, enabling code execution

Because only Subscriber-level access is required — the lowest privilege tier on most WordPress sites, often available via open registration — this significantly lowers the bar for exploitation compared to admin-only vulnerabilities.

Impact of Successful Exploitation

ImpactDescription
Remote Code ExecutionArbitrary code execution on the web server
Low Privilege BarOnly requires Subscriber-level access, not Admin/Editor
Database CompromiseFull read/write via wp-config.php credentials if RCE succeeds
Site TakeoverWebshell deployment leads to full site and potentially server compromise

Immediate Remediation

Step 1: Update to Version 9.3.01.003

# Via WP-CLI
wp plugin update wp-photo-album-plus
 
# Verify the installed version
wp plugin get wp-photo-album-plus --field=version

Or update through WordPress admin: Plugins > Installed Plugins > WP Photo Album Plus > Update Now.

Step 2: Review Subscriber Registrations

  1. Navigate to Users > All Users and filter by Subscriber role
  2. Audit recently registered accounts for suspicious activity
  3. Disable open user registration (Settings > General > Membership) if not required

Step 3: Scan for Existing Compromise

# Search for recently uploaded files with unusual filenames in the plugin's upload paths
find /path/to/wordpress/wp-content/uploads/wppa/ -type f -newer /path/to/wordpress/wp-includes/version.php
 
# Check for webshell signatures
grep -rl "eval\s*(base64_decode\|system\s*(\|shell_exec\s*(" /path/to/wordpress/wp-content/uploads/wppa/

If Immediate Patching Is Not Possible

  1. Disable open user registration to prevent low-cost account creation
  2. Restrict photo upload permissions to trusted roles only, if the plugin supports it
  3. Monitor server-level exec() calls originating from PHP-FPM/Apache worker processes if feasible

Detection Indicators

IndicatorDescription
Uploaded filenames containing shell metacharacters or spaces followed by flagsExploitation attempt
Unexpected ImageMagick child processes spawned by the web serverPossible successful exploitation
New Subscriber accounts followed immediately by image uploadsReconnaissance/exploitation pattern

Post-Remediation Steps

  1. Confirm plugin updated to 9.3.01.003 or later
  2. Audit Subscriber accounts created since the plugin was last updated
  3. Scan the installation for webshells and unauthorized files
  4. Rotate credentials — WordPress admin, database, API keys
  5. Consider disabling open registration permanently if not business-critical

References