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
| Attribute | Value |
|---|---|
| CVE ID | CVE-2026-87909 |
| CVSS Score | 7.5 (High) |
| CWE | CWE-74 (Improper Neutralization of Special Elements in Output Used by a Downstream Component) |
| Type | Authenticated Argument Injection → RCE |
| Attack Vector | Network |
| Privileges Required | Subscriber-level account or above |
| Affected Function | wppa_image_magick() |
Affected Versions
| Plugin | Affected Versions | Fixed Version |
|---|---|---|
| WP Photo Album Plus | ≤ 9.2.09.002 | 9.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 executionBecause 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
| Impact | Description |
|---|---|
| Remote Code Execution | Arbitrary code execution on the web server |
| Low Privilege Bar | Only requires Subscriber-level access, not Admin/Editor |
| Database Compromise | Full read/write via wp-config.php credentials if RCE succeeds |
| Site Takeover | Webshell 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=versionOr update through WordPress admin: Plugins > Installed Plugins > WP Photo Album Plus > Update Now.
Step 2: Review Subscriber Registrations
- Navigate to Users > All Users and filter by Subscriber role
- Audit recently registered accounts for suspicious activity
- 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
- Disable open user registration to prevent low-cost account creation
- Restrict photo upload permissions to trusted roles only, if the plugin supports it
- Monitor server-level exec() calls originating from PHP-FPM/Apache worker processes if feasible
Detection Indicators
| Indicator | Description |
|---|---|
| Uploaded filenames containing shell metacharacters or spaces followed by flags | Exploitation attempt |
| Unexpected ImageMagick child processes spawned by the web server | Possible successful exploitation |
| New Subscriber accounts followed immediately by image uploads | Reconnaissance/exploitation pattern |
Post-Remediation Steps
- Confirm plugin updated to 9.3.01.003 or later
- Audit Subscriber accounts created since the plugin was last updated
- Scan the installation for webshells and unauthorized files
- Rotate credentials — WordPress admin, database, API keys
- Consider disabling open registration permanently if not business-critical