PDF Invoice for WooCommerce Template Builder, PHP Object Injection (CVE-2026-136240)
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.
Vulnerability Intelligence
TheoreticalWeakness (CWE)
Timeline
- Disclosed
- November 26, 2026
References & Proof of Concept
- https://downloads.wordpress.org/plugin/pdf-for-woocommerce.7.2.1.zip
- 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/libs/HtmlNode.php#L280
- https://plugins.trac.wordpress.org/browser/pdf-for-woocommerce/tags/7.2.0/vendor/mpdf/mpdf/src/Cache.php#L102
- https://plugins.trac.wordpress.org/browser/pdf-for-woocommerce/tags/7.2.0/vendor/mpdf/mpdf/src/Mpdf.php#L9105
- 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/woocommerce/shortcodes.php#L975
- https://www.wordfence.com/threat-intel/vulnerabilities/id/6bdb8018-8a96-45b1-b1e6-5766891bca76?source=cve
CVSS
What is CVE-2026-136240 PDF Invoice for WooCommerce Template Builder, PHP Object Injection (CVE-2026-136240)?
PDF Invoice for WooCommerce Template Builder, PHP Object Injection (CVE-2026-136240) (CVE-2026-136240) maps to the Initial Access and Execution tactics — the adversary is trying to get into your network in MITRE ATT&CK.
This page provides production-ready detection logic for PDF Invoice for WooCommerce Template Builder, PHP Object Injection (CVE-2026-136240), covering the data sources and telemetry it touches: IIS web server logs, WordPress reverse proxy / WAF logs. The queries below are rated critical severity at medium confidence, and ship for 7 SIEM platforms — KQL, SPL, Elastic, QRadar, Sumo, YARA-L, LogScale.
MITRE ATT&CK
- Tactic
- Initial Access Execution
// df00tech DF00-e23a9a39e4 · https://df00tech.com/detections/CVE-2026-136240 · licence: https://df00tech.com/detections/licence
let serializedMarkers = dynamic(["O:", "a:", "C:", "O%3A", "a%3A", "C%3A"]);
let pdfPaths = dynamic(["pdf-for-woocommerce", "generate_wpo_wcpdf", "wpo_wcpdf", "wc_pdf_invoice", "shortcodes.php"]);
W3CIISLog
| where csUriStem has_any (pdfPaths) or csUriQuery has_any (pdfPaths)
| extend decodedQuery = url_decode(csUriQuery)
| where decodedQuery matches regex @"(?i)(O|C):[0-9]+:\"|a:[0-9]+:\{" or csUriQuery has_any (serializedMarkers)
| where csMethod in ("POST", "GET")
| project TimeGenerated, cIP, csMethod, csUriStem, csUriQuery, decodedQuery, scStatus, csUserAgent, Computer
| sort by TimeGenerated desc Finds HTTP requests to the WooCommerce PDF invoice plugin endpoints whose query string contains PHP serialized-object markers (O:, C:, a:), indicating a PHP object injection attempt against CVE-2026-136240.
Data Sources
Required Tables
False Positives
- Legitimate serialized data in cookies or query strings produced by other WordPress plugins
- Security scanners (Wordfence, WPScan) probing for PHP object injection
- Developers testing PDF template generation with crafted payloads in a staging environment
Query fingerprint DF00-e23a9a39e4 · licence
Sigma logsource & community rules
The detection logic for PDF Invoice for WooCommerce Template Builder, PHP Object Injection (CVE-2026-136240) (CVE-2026-136240) above is provided in a vendor-neutral
form so you can deploy it on any SIEM. The same logic is shipped here as native
KQL (Microsoft Sentinel / Defender), SPL (Splunk), Elastic (Elastic Security (EQL)), QRadar (IBM QRadar (AQL)), Sumo (Sumo Logic CSE), YARA-L (Google Chronicle / SecOps), LogScale (CrowdStrike LogScale (CQL)) queries. In Sigma terms, this detection targets the
following logsource:
logsource:
category: network_connection
product: windows Browse the community-maintained Sigma rules for this technique:
Platform-specific guides for CVE-2026-136240
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
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.
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.
Related Detections
Tactic Hubs
Related Techniques
Same Tactic: Initial Access
Browse by tactic
- Reconnaissance TA0043
- Resource Development TA0042
- Initial Access TA0001
- Execution TA0002
- Persistence TA0003
- Privilege Escalation TA0004
- Stealth TA0005
- Defense Impairment TA0112
- Credential Access TA0006
- Discovery TA0007
- Lateral Movement TA0008
- Collection TA0009
- Command and Control TA0011
- Exfiltration TA0010
- Impact TA0040