CVE-2022-2439·PHP vulnerability
The Easy Digital Downloads – Simple eCommerce for Selling Digital Files plugin for WordPress is vulnerable to deserialization of untrusted input via the 'upload[file]' parameter in versions up to, and including 3.3.3. This makes it possible for authenticated administrative users to call files using a PHAR wrapper, that will deserialize and call arbitrary PHP Objects that can be used to perform a variety of malicious actions granted a POP chain is also present.
- Severity
- high
- Software
- PHP
- Fixed in
- 3.3.4
- Published
- 2024-09-24
Affected versions
Until: 3.3.4
Fixed in: 3.3.4
How to fix this CVE
Update the Easy Digital Downloads plugin to version 3.3.4 or later, which removes unsafe deserialization of untrusted file upload parameters. Administrative users should immediately patch this plugin to prevent object injection attacks that could lead to remote code execution. Verify the update is applied and test file upload functionality to ensure normal operation.
sudo dnf update php php-common php-cliDefensia detects this vulnerability
What an exploitation attempt looks like
Sample log line indicative of exploitation attempts:
POST request to wp-admin/edit.php?post_type=download&page=edd-import-file with Content-Disposition headers containing serialized PHP objects, PHAR stream wrappers (phar://), or file parameter values with base64-encoded serialized data containing __wakeup, __destruct, or __toString magic methodsWAF mitigation (if patching is not yet possible)
Add this rule to your WAF to block exploitation attempts while you schedule the patch.
Block POST requests to the EDD import handler containing serialized PHP object patterns (strings starting with 'O:', 'C:', 'R:' followed by digit:class_name patterns) and PHAR protocol references (phar://) in the upload[file] parameter. Restrict administrative file upload functionality to trusted IP ranges.How to check if you are affected
- Check installed PHP version: php -v
- Verify Easy Digital Downloads plugin version by running: grep -i 'version' /path/to/wordpress/wp-content/plugins/easy-digital-downloads/easy-digital-downloads.php | head -5
- Search WordPress logs and PHP error logs for deserialization warnings or PHAR wrapper attempts: grep -i 'phar\|unserialize\|__wakeup\|__destruct' /var/log/php*.log /var/www/html/wp-content/debug.log 2>/dev/null
- Confirm plugin update by verifying version string shows 3.3.4 or higher: php -r "include('/path/to/wordpress/wp-content/plugins/easy-digital-downloads/easy-digital-downloads.php'); echo 'Plugin loaded successfully';"
FAQ
What is CVE-2022-2439?
CVE-2022-2439 is a PHP object deserialization vulnerability in the Easy Digital Downloads WordPress plugin that allows authenticated administrators to instantiate arbitrary PHP objects through malicious file uploads, potentially leading to remote code execution if gadget chains are available on the system.
Is CVE-2022-2439 being actively exploited?
No, CVE-2022-2439 is not listed in the CISA Known Exploited Vulnerabilities catalog and has no publicly disclosed exploit code available.
What versions of PHP are affected by CVE-2022-2439?
The Easy Digital Downloads plugin versions up to and including 3.3.3 are affected. This impacts any WordPress installation using a vulnerable version of the plugin, regardless of the underlying PHP version.
How do I check if my server is vulnerable to CVE-2022-2439?
Run: grep -i 'Version:' /path/to/wordpress/wp-content/plugins/easy-digital-downloads/easy-digital-downloads.php to check the plugin version, or use wp-cli: wp plugin get easy-digital-downloads --field=version
Does Defensia detect CVE-2022-2439?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Easy Digital Downloads plugin is installed on a monitored WordPress server, CVE-2022-2439 will appear in your dashboard with remediation steps.
Related PHP CVEs
References
- https://plugins.trac.wordpress.org/changeset/3154854/easy-digital-downloads/tags/3.3.4/includes/admin/import/import-functions.php
- https://plugins.trac.wordpress.org/changeset/3154854/easy-digital-downloads/tags/3.3.4/src/Utils/FileSystem.php
- https://www.wordfence.com/threat-intel/vulnerabilities/id/644c8702-08ad-4048-ae91-041f1771f1dc?source=cve
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2022-2439. Free for 1 server.
Get started free