Detect PDF Invoice for WooCommerce Template Builder, PHP Object Injection (CVE-2026-136240) in IBM QRadar
Detects exploitation of CVE-2026-136240, a PHP Object Injection (CWE-502) vulnerability in the 'PDF Invoice for WooCommerce + Drag and Drop Template Builder' WordPress plugin (pdf-for-woocommerce) in all versions up to and including 7.2.0. Untrusted input reaches unserialize() in the plugin's HTML document/node handling and mPDF cache code paths, allowing an unauthenticated attacker to inject a PHP object. The plugin contains no known POP gadget chain, so there is no impact unless another installed plugin or theme supplies a usable chain. When such a chain is present, the deserialization can lead to arbitrary file delete, sensitive data disclosure, or code execution depending on the chain. Detection focuses on web requests to WooCommerce PDF invoice shortcode/email endpoints carrying serialized PHP object markers (O:, a:, C:) and on the file/process side effects of successful deserialization.
MITRE ATT&CK
- Tactic
- Initial Access Execution
QRadar Detection Query
-- df00tech DF00-e23a9a39e4 · https://df00tech.com/detections/CVE-2026-136240 · licence: https://df00tech.com/detections/licence
SELECT sourceip, url, "userAgent", eventcount FROM events WHERE (url ILIKE '%pdf-for-woocommerce%' OR url ILIKE '%wpo_wcpdf%' OR url ILIKE '%generate_wpo_wcpdf%' OR url ILIKE '%shortcodes.php%') AND (url IMATCHES '.*(O|C):[0-9]+:".*' OR url IMATCHES '.*a:[0-9]+:\{.*' OR url ILIKE '%O%3A%' OR url ILIKE '%C%3A%') ORDER BY eventcount DESC LAST 24 HOURS QRadar AQL selecting web events to the WooCommerce PDF invoice plugin containing PHP serialized-object injection markers.
Data Sources
Required Tables
False Positives & Tuning
- Legitimate serialized payloads from other WordPress components
- Scanner activity
- Internal QA traffic
Other platforms for CVE-2026-136240
Testing Methodology
Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are further down this page.
- Test 1 PHP object injection marker in PDF invoice shortcode request
Expected signal: Web server access log entry to a pdf-for-woocommerce/wpo_wcpdf endpoint containing the serialized marker O%3A8%3A.
- Test 2 POST serialized array payload to WooCommerce email index
Expected signal: Web log entry for POST to pdf-for-woocommerce emails path with serialized array/object markers in the body or query.
- Test 3 mPDF cache path request with custom-object marker
Expected signal: Web log entry referencing the mpdf Cache.php path containing the C%3A serialized marker.
References (5)
- https://www.wordfence.com/threat-intel/vulnerabilities/id/6bdb8018-8a96-45b1-b1e6-5766891bca76?source=cve
- https://plugins.trac.wordpress.org/browser/pdf-for-woocommerce/tags/7.2.0/woocommerce/shortcodes.php#L975
- https://plugins.trac.wordpress.org/browser/pdf-for-woocommerce/tags/7.2.0/woocommerce/emails/index.php#L70
- https://plugins.trac.wordpress.org/browser/pdf-for-woocommerce/tags/7.2.0/libs/HtmlDocument.php#L300
- https://plugins.trac.wordpress.org/browser/pdf-for-woocommerce/tags/7.2.0/vendor/mpdf/mpdf/src/Cache.php#L102
Response Playbook
Triage
- Decode the suspicious query string and confirm it contains a PHP serialized object (O:<len>:"ClassName", C:<len>:, or a:<len>:{) rather than a benign serialized array from a legitimate plugin.
- Identify the exact endpoint hit (shortcodes.php generate action, WooCommerce email index, or an mPDF cache path) and whether the request was authenticated and what WooCommerce order/context it referenced.
- Determine the installed pdf-for-woocommerce plugin version on the host; confirm whether it is <= 7.2.0 and therefore vulnerable.
- Enumerate which other plugins/libraries (WooCommerce core, mPDF, Action Scheduler) are present that could supply a usable POP gadget chain.
Containment
- Deactivate or hotfix the pdf-for-woocommerce plugin, or apply a WAF rule blocking PHP serialized-object markers to the PDF invoice endpoints until patched.
- Block the attacking source IP(s) at the edge/WAF and invalidate any sessions associated with the requests.
- If object injection led to file writes, quarantine the webroot and restrict write permissions on upload and mPDF cache directories.
Evidence Collection
- Preserve raw web server access/error logs covering the suspicious requests, including full URL, body, headers, and response codes.
- Capture the WordPress uploads and mPDF temp/cache directories (wp-content/uploads, plugin tmp) for newly created or modified PHP/webshell files, with hashes and timestamps.
Escalation Criteria
- !Escalate to incident response if the deserialization resulted in file writes to the webroot, new admin users, or outbound connections indicating RCE.
- !Escalate if the plugin version is confirmed vulnerable and logs show repeated or successful (HTTP 200 with PDF output) exploitation from external sources.
Investigation Guide
Forensic Artifacts
- >
Web server access/error logs showing requests with serialized-object markers to PDF invoice endpoints - >
Newly created or modified PHP files in wp-content/uploads and mPDF cache/tmp directories - >
PHP-FPM / web server process telemetry spawning shell interpreters shortly after the request
Tuning Guidance
Baseline which WordPress plugins on your estate legitimately pass serialized data in query strings or cookies and exclude those paths. Tighten the regex to require an object/custom marker (O: or C:) rather than the array marker (a:) if benign arrays cause noise. Scope the search to the specific pdf-for-woocommerce endpoints (shortcodes.php generate action, WooCommerce email index) to reduce false positives from unrelated traffic.
Hunting Queries
Hunt for bursts of serialized PHP object markers aimed at the WooCommerce PDF invoice plugin, grouped by source IP over time.
// df00tech DF00-e23a9a39e4 · https://df00tech.com/detections/CVE-2026-136240 · licence: https://df00tech.com/detections/licence
W3CIISLog | extend d=url_decode(csUriQuery) | where csUriStem has "pdf-for-woocommerce" or d has "wpo_wcpdf" | where d matches regex @"(?i)(O|C):[0-9]+:\"" | summarize count() by cIP, bin(TimeGenerated, 1h) ``` df00tech DF00-e23a9a39e4 · https://df00tech.com/detections/CVE-2026-136240 · licence: https://df00tech.com/detections/licence ```
index=web ("pdf-for-woocommerce" OR "wpo_wcpdf") | eval d=urldecode(uri_query) | regex d="(?i)(O|C):[0-9]+:\"" | timechart span=1h count by src_ip Atomic Red Team Tests
Sends a GET request to the WooCommerce PDF invoice shortcode endpoint with a URL-encoded PHP serialized object to trigger the detection (lab only).
Command
curl -s -o /dev/null 'http://wordpress.lab/?page_id=1&wpo_wcpdf=generate&data=O%3A8%3A%22stdClass%22%3A0%3A%7B%7D' Cleanup
echo 'No cleanup required; request is non-persistent.' Expected Telemetry
Web server access log entry to a pdf-for-woocommerce/wpo_wcpdf endpoint containing the serialized marker O%3A8%3A.
Expected Detection
KQL/SPL/EQL rules fire on the O: serialized marker in the query string.
Posts a serialized PHP array to the WooCommerce emails index path simulating object injection input (lab only).
Command
curl -s -o /dev/null -X POST 'http://wordpress.lab/wp-content/plugins/pdf-for-woocommerce/woocommerce/emails/index.php' --data 'tpl=a%3A1%3A%7Bi%3A0%3BO%3A8%3A%22stdClass%22%3A0%3A%7B%7D%7D' Cleanup
echo 'No cleanup required.' Expected Telemetry
Web log entry for POST to pdf-for-woocommerce emails path with serialized array/object markers in the body or query.
Expected Detection
Detection matches the a:/O: serialized markers on the pdf-for-woocommerce path.
Requests the plugin's mPDF cache path with a URL-encoded custom-serialized object marker (C:) to validate detection of the C: variant (lab only).
Command
curl -s -o /dev/null 'http://wordpress.lab/wp-content/plugins/pdf-for-woocommerce/vendor/mpdf/mpdf/src/Cache.php?x=C%3A11%3A%22ArrayObject%22%3A0%3A%7B%7D' Cleanup
echo 'No cleanup required.' Expected Telemetry
Web log entry referencing the mpdf Cache.php path containing the C%3A serialized marker.
Expected Detection
Rules fire on the C: custom-serialized object marker for the plugin path.