CVE-2025-58048 Splunk · SPL

Detect CVE-2025-58048: Paymenter Remote Code Execution via Unrestricted File Upload in Splunk

Detects exploitation of CVE-2025-58048, a critical unrestricted file upload vulnerability (CWE-434) in Paymenter versions prior to 1.2.11. Attackers can upload malicious files (e.g., PHP webshells) through publicly accessible upload endpoints, achieving remote code execution on the server. CVSS 9.9 with public PoC available.

MITRE ATT&CK

Tactic
Initial Access Execution Persistence Impact

SPL Detection Query

Splunk (SPL)
spl
index=web OR index=main sourcetype IN (access_combined, apache_access, nginx_access, php_error)
| eval file_ext=lower(mvindex(split(uri_path, "."), -1))
| where match(uri_path, "(?i)/(upload|uploads|files|storage|public)") AND match(http_method, "^POST$")
| eval is_suspicious_ext=if(file_ext IN ("php","php3","php4","php5","phtml","phar","asp","aspx","jsp","sh","bash","py","pl","cgi"), 1, 0)
| where is_suspicious_ext=1 OR status IN ("200", "201") AND match(uri_path, "(?i)\.(php|phtml|phar|jsp|asp|aspx|sh|bash|py|pl)")
| eval severity=case(
    file_ext IN ("php","phtml","phar"), "critical",
    file_ext IN ("asp","aspx","jsp"), "critical",
    file_ext IN ("sh","bash","py","pl"), "high",
    true(), "medium"
  )
| stats count min(_time) as first_seen max(_time) as last_seen values(uri_path) as upload_paths values(status) as http_statuses by src_ip, file_ext, severity
| where count > 0
| eval first_seen=strftime(first_seen, "%Y-%m-%d %H:%M:%S"), last_seen=strftime(last_seen, "%Y-%m-%d %H:%M:%S")
| sort -count
| table src_ip, file_ext, severity, count, first_seen, last_seen, upload_paths, http_statuses
critical severity high confidence

Identifies POST requests uploading potentially malicious files with executable extensions to Paymenter upload directories. Categorizes by extension risk level and aggregates by source IP for investigation.

Data Sources

Web Server LogsApache/Nginx Access LogsPHP Error Logs

Required Sourcetypes

access_combinedapache_accessnginx_accessphp_error

False Positives & Tuning

  • Authorized administrator uploads of legitimate PHP extensions or plugins
  • Content management operations that include PHP template files
  • Automated testing frameworks uploading test fixture files to staging environments
  • Backup agents that copy PHP files to upload directories during restoration

Other platforms for CVE-2025-58048


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 available with Pro.

  1. Test 1Upload PHP Webshell to Paymenter Public Storage

    Expected signal: Web server logs showing POST to /upload with multipart/form-data containing .php file; file creation event in storage/app/public directory; HTTP 200/201 response code

  2. Test 2Execute Commands via Uploaded Webshell

    Expected signal: GET requests to storage/app/public/*.php path; PHP process spawning id, uname, whoami child processes; outbound network connection from PHP/web server process to attacker IP

  3. Test 3Bypass MIME Type Restriction via Content-Type Spoofing

    Expected signal: Web server logs showing POST uploads with mismatched Content-Type and file extension; file creation events with double extensions or PHP extensions in upload directories; magic byte mismatch in uploaded files

Unlock Pro Content

Get the full detection package for CVE-2025-58048 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections