Skip to content
CVE-2026-104998

CVE-2026-104998: Arbitrary File Upload in Product Input Fields for WooCommerce (PIF Cart)

Initial Access Execution Persistence Last updated:

Detects exploitation of CVE-2026-104998, an unauthenticated arbitrary file upload vulnerability (CWE-434) in the Product Input Fields for WooCommerce WordPress plugin in all versions up to and including 2.1.0. The process_file_input_field function in the PIF cart handler (includes/class-pif-cart.php) relies on the client-supplied multipart Content-Type header as the only file type check and writes the upload to the pif_temp directory using the client-supplied filename. The pif_temp directory is created without .htaccess or index.php restrictions, so written files are directly web-accessible and executable on default Apache/mod_php setups, allowing an attacker to upload executable PHP and achieve remote code execution. Exploitation requires a product configured with a File-type Product Input Field with the Show thumbnail option enabled. Detection focuses on suspicious multipart POST requests to WooCommerce cart or product endpoints followed by requests to newly created PHP files, and on web server processes spawning shells. Exploit status is theoretical at time of writing.

Vulnerability Intelligence

Theoretical

What is CVE-2026-104998 CVE-2026-104998: Arbitrary File Upload in Product Input Fields for WooCommerce (PIF Cart)?

CVE-2026-104998: Arbitrary File Upload in Product Input Fields for WooCommerce (PIF Cart) (CVE-2026-104998) maps to the Initial Access and Execution and Persistence tactics — the adversary is trying to get into your network in MITRE ATT&CK.

This page provides production-ready detection logic for CVE-2026-104998: Arbitrary File Upload in Product Input Fields for WooCommerce (PIF Cart), covering the data sources and telemetry it touches: IIS W3C logs, WordPress/WooCommerce web access 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 Persistence
Microsoft Sentinel / Defender
kusto
// df00tech DF00-e4d5104a36 · https://df00tech.com/detections/CVE-2026-104998 · licence: https://df00tech.com/detections/licence
let uploadEndpoints = dynamic(["wc-ajax", "admin-ajax.php", "pif", "add-to-cart", "cart"]);
let suspiciousExt = dynamic([".php", ".phtml", ".php3", ".php4", ".php5", ".php7", ".phar", ".pht", ".inc"]);
W3CIISLog
| where csMethod == "POST"
| where csUriStem has_any (uploadEndpoints)
| where csUriQuery has_any (uploadEndpoints) or cs_bytes > 1000
| project TimeGenerated, sIP = sSiteName, cIP, csUriStem, csUriQuery, csMethod, scStatus, csUserAgent, cs_bytes
| join kind=leftouter (
    W3CIISLog
    | where csMethod in ("GET","POST")
    | where csUriStem has "wp-content/uploads"
    | where csUriStem has_any (suspiciousExt)
    | project ShellTime = TimeGenerated, cIP, ShellUri = csUriStem, ShellStatus = scStatus
) on cIP
| where isempty(ShellTime) or (ShellTime between (TimeGenerated .. (TimeGenerated + 2h)))
| summarize count(), ShellUris = make_set(ShellUri), FirstSeen = min(TimeGenerated) by cIP, csUserAgent

Identifies POST requests to WooCommerce/PIF cart endpoints correlated with subsequent requests to PHP files under wp-content/uploads from the same client IP, indicating a successful web shell upload.

critical severity medium confidence

Data Sources

IIS W3C logs WordPress/WooCommerce web access logs

Required Tables

W3CIISLog

False Positives

  • Legitimate administrators testing plugin uploads in a staging environment
  • Security scanners (e.g. Wordfence, WPScan) probing the upload endpoint without a real shell
  • PHP files legitimately placed under uploads by other plugins such as caching or gallery plugins

Query fingerprint DF00-e4d5104a36 · licence

Sigma logsource & community rules

The detection logic for CVE-2026-104998: Arbitrary File Upload in Product Input Fields for WooCommerce (PIF Cart) (CVE-2026-104998) 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:
  product: windows

Browse the community-maintained Sigma rules for this technique:


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.

  1. Test 1 Simulate PIF arbitrary file upload via multipart POST

    Expected signal: Web access log entry: POST to admin-ajax.php with wc-ajax/pif parameters, multipart content-type, non-trivial request body size.

  2. Test 2 Request uploaded web shell from uploads directory

    Expected signal: Web access log entry: GET to wp-content/uploads/*.php returning HTTP 200 (if file present) or 404.

  3. Test 3 Web server spawns shell (post-exploitation RCE)

    Expected signal: Endpoint process telemetry: php-fpm/apache2/nginx parent spawning /bin/sh with command line 'id; uname -a'.


Response Playbook

Triage

  1. Identify the affected host and confirm the Product Input Fields for WooCommerce plugin is installed at version <= 2.1.0 via wp-content/plugins/product-input-fields-for-woocommerce/ or the WordPress admin plugins page.
  2. Review web access logs for the flagged client IP: confirm a multipart/form-data POST to a WooCommerce/PIF cart endpoint (wc-ajax, admin-ajax.php, add-to-cart) immediately preceding a request to a PHP file under the plugin upload directory.
  3. Inspect the plugin upload directory (pif_temp) and the wp-content/uploads tree for recently created or modified files with PHP-executable extensions (.php, .phtml, .phar, .pht) and review their contents for web shell signatures (eval, base64_decode, system, assert).
  4. Correlate the source IP with threat intel and check whether the same IP accessed any uploaded file returning HTTP 200, indicating successful execution.

Containment

  1. Deactivate the Product Input Fields for WooCommerce plugin or update it to a fixed version beyond 2.1.0, and block the plugin's upload endpoint at the WAF.
  2. Quarantine or delete any confirmed web shell files and block the attacker source IP at the perimeter firewall/WAF.
  3. Isolate the web server host from the network if active command execution via a shell is confirmed.

Evidence Collection

  1. Preserve full web server access and error logs covering the window around the upload, plus the raw uploaded file(s) with hashes (SHA-256) for forensic analysis.
  2. Capture a timeline of file creation/modification under the plugin upload directory and wp-content/uploads (filesystem mtime/ctime) and the WordPress database audit of recent option/user changes.
  3. Collect endpoint process telemetry showing any web server process spawning shells or interpreters, including command lines and network connections.

Escalation Criteria

  • ! Escalate to incident response if an uploaded PHP file returned HTTP 200 to the attacker or if endpoint telemetry shows the web server spawning a shell (confirmed RCE).
  • ! Escalate if evidence of lateral movement, new administrative WordPress users, outbound C2 connections, or data exfiltration is found.

Investigation Guide

Forensic Artifacts

  • > Newly created PHP files under the plugin upload directory or wp-content/uploads with recent mtime/ctime.
  • > Web server access log entries showing the multipart POST and subsequent GET/POST to the uploaded file.
  • > Web server process tree showing php-fpm/apache/nginx/w3wp spawning sh, bash, cmd.exe, or powershell.

Tuning Guidance

Baseline legitimate PHP files that other installed plugins may serve from wp-content/uploads and exclude those known paths. Narrow the cart-endpoint list to the specific PIF/WooCommerce routes used by your site, and restrict the correlation window (maxspan) if the environment is high-traffic to reduce transaction noise. Allowlist known administrator and scanner source IPs where appropriate.


Hunting Queries

Hunts for successful (HTTP 200) requests to PHP files located under the WordPress uploads directory, which should normally never serve executable PHP.

Hunting — KQL
kql
// df00tech DF00-e4d5104a36 · https://df00tech.com/detections/CVE-2026-104998 · licence: https://df00tech.com/detections/licence
W3CIISLog | where csUriStem has "wp-content/uploads" and csUriStem has_any (".php", ".phtml", ".phar") | where scStatus == 200 | summarize count() by cIP, csUriStem, bin(TimeGenerated, 1h)
Hunting — SPL
spl
``` df00tech DF00-e4d5104a36 · https://df00tech.com/detections/CVE-2026-104998 · licence: https://df00tech.com/detections/licence ```
index=web (sourcetype=access_combined OR sourcetype=iis) uri="*wp-content/uploads*" (uri="*.php*" OR uri="*.phtml*" OR uri="*.phar*") status=200 | stats count by clientip, uri

Atomic Red Team Tests

Test 1 Simulate PIF arbitrary file upload via multipart POST
linux

Uploads a benign PHP test file to the simulated PIF cart endpoint to validate detection of the upload request pattern.

Command

bash
echo '<?php echo "pif-test-marker"; ?>' > /tmp/pif_test.php && curl -s -X POST 'http://localhost/wp-admin/admin-ajax.php?action=wc-ajax&pif_upload=1' -F 'pif_file=@/tmp/pif_test.php;type=application/x-php' -A 'pif-atomic-test'

Cleanup

bash
rm -f /tmp/pif_test.php

Expected Telemetry

Web access log entry: POST to admin-ajax.php with wc-ajax/pif parameters, multipart content-type, non-trivial request body size.

Expected Detection

KQL/SPL correlation rule flags the POST to the PIF/WooCommerce cart endpoint as the first stage of the upload sequence.

Test 2 Request uploaded web shell from uploads directory
linux

Simulates the attacker accessing a PHP file placed under wp-content/uploads to trigger execution.

Command

bash
curl -s 'http://localhost/wp-content/uploads/2026/11/pif_test.php?cmd=id' -A 'pif-atomic-test'

Cleanup

bash
echo 'No local cleanup required; remove staged file from uploads directory on the test web server.'

Expected Telemetry

Web access log entry: GET to wp-content/uploads/*.php returning HTTP 200 (if file present) or 404.

Expected Detection

Correlation rule / hunting query flags a request to a PHP file under wp-content/uploads from the same source IP as the upload POST.

Test 3 Web server spawns shell (post-exploitation RCE)
linux

Simulates a web shell executing an OS command by spawning a shell from the web server process context.

Command

bash
sudo -u www-data /bin/sh -c 'id; uname -a' 2>/dev/null || /bin/sh -c 'id; uname -a'

Cleanup

bash
echo 'No persistent artifacts created.'

Expected Telemetry

Endpoint process telemetry: php-fpm/apache2/nginx parent spawning /bin/sh with command line 'id; uname -a'.

Expected Detection

CrowdStrike CQL rule flags the web server process spawning a shell child process.

Related Detections

Browse by tactic

Full ATT&CK matrix Search all detections