Detect CVE-2025-58048: Paymenter Remote Code Execution via Unrestricted File Upload in CrowdStrike LogScale
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
LogScale Detection Query
#event_simpleName=NetworkReceiveAccept OR #event_simpleName=NetworkConnectIP4
| CommandLine = /paymenter|php|artisan/i
| join (
#event_simpleName=FileOpenInfo
| FilePath = /\/(uploads?|storage\/app\/public|public\/files)\//i
| FileName = /\.(php[0-9]?|phtml|phar|asp[x]?|jsp|sh|bash|py|pl|cgi)$/i
| eval FileExtension=lower(match_regex(FileName, @"\.[^.]+$"))
| select timestamp, aid, FileName, FilePath, FileExtension, UserName
) on aid
| eval TimeDiffSeconds = abs(timestamp - #timestamp)
| where TimeDiffSeconds < 120
| groupBy([aid, FileName, FilePath, FileExtension, RemoteAddressIP4], function=[
count(as=upload_count),
min(timestamp, as=first_seen),
max(timestamp, as=last_seen),
collect(UserName, as=users)
])
| where upload_count > 0
| eval RiskLevel=if(FileExtension in ("php","phtml","phar","asp","aspx","jsp"), "CRITICAL", "HIGH")
| sort(field=first_seen, order=desc) CrowdStrike Falcon LogScale query correlating network activity with file creation events for executable extensions in Paymenter upload directories, detecting CVE-2025-58048 exploitation attempts.
Data Sources
Required Tables
False Positives & Tuning
- Paymenter system updates deploying PHP files to storage directories
- Authorized administrator file management operations via web interface
- Continuous integration processes that update PHP application files
- Security scanning tools executing file upload tests in authorized assessment contexts
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.
- 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
- 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
- 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
References (5)
- https://github.com/Paymenter/Paymenter/security/advisories/GHSA-5pm9-r2m8-rcmj
- https://nvd.nist.gov/vuln/detail/CVE-2025-58048
- https://github.com/Paymenter/Paymenter/commit/87c3db42282ada1e3cda54b9a01f846926c0669b
- https://github.com/Paymenter/Paymenter/releases/tag/v1.2.11
- https://github.com/advisories/GHSA-5pm9-r2m8-rcmj
Unlock Pro Content
Get the full detection package for CVE-2025-58048 including response playbook, investigation guide, and atomic red team tests.