CosmicSting Vulnerability Validator
Public tool for validating Magento stores against the critical CosmicSting vulnerability (CVE-2024-34102)
A publicly available Magento 2 vulnerability scanner designed to help store owners quickly validate whether their site was affected by CosmicSting (CVE-2024-34102) — one of the most severe Magento security vulnerabilities ever disclosed. The tool provided safe, non-invasive security validation at scale during an active exploitation window, helping merchants prioritize patching and incident response.
CosmicSting (CVE-2024-34102) enabled arbitrary file read, remote code execution, and complete Magento store compromise.
The Problem
In mid-2024, CosmicSting (CVE-2024-34102) was disclosed as a critical XXE vulnerability affecting Magento 2 installations worldwide. Exploitation began almost immediately, with attackers mass-scanning the internet for vulnerable stores and rapidly escalating access to full server compromise.
Magento merchants faced several urgent challenges:
- No simple way to confirm exposure without specialist security knowledge
- Limited time to respond during an active exploitation campaign
- Risky third-party scanners that could damage production environments
There was a clear need for a trusted, production-safe Magento security validation tool that could be used by non-experts under emergency conditions.
Solution
The Solution
The CosmicSting Vulnerability Validator was built as a lightweight PHP-based web application capable of confirming real-world exploitability without causing harm to the target system.
The scanner executed a controlled proof-of-concept exploit designed to read the target system’s /etc/passwd file - a reliable indicator of successful XXE exploitation. When successful, the vulnerable Magento server would make a callback request to a uniquely generated endpoint in the format: https://cosmicsting.samdjames.uk/<DOMAIN_HASH>.dtd
After submitting the exploit, the application would:
- Pause briefly to allow asynchronous callbacks
- Inspect newly written access logs for the domain hash
- Confirm vulnerability status without storing sensitive scan data
To ensure ethical use and prevent abuse, several defensive controls were implemented:
- Multi-layer rate limiting via Nginx, PHP, and Fail2Ban
- CAPTCHA challenges for suspicious traffic patterns
- Short-term log retention to prevent automated mass scanning
Impact & Results
The validator provided critical security validation for thousands of Magento stores during a live incident, accelerating patch adoption across the ecosystem.
The tool became a widely shared community security resource, referenced by Magento agencies, developers, and hosting providers during coordinated response efforts.
Technical Highlights
- Rapid development and deployment under emergency conditions
- High-volume request handling with minimal infrastructure overhead
- Active monitoring and alerting for abuse patterns
- Careful balance between open access and responsible security controls