CVE-2024-42640
LogPulse has a published detection rule for this CVE: it raises a notable when someone tries to exploit it.
What the vulnerability is
angular-base64-upload prior to v0.1.21 is vulnerable to unauthenticated remote code execution via demo/server.php. Exploiting this vulnerability allows an attacker to upload arbitrary content to the server, which can subsequently be accessed through demo/uploads. This leads to the execution of previously uploaded content and enables the attacker to achieve code execution on the server. NOTE: This vulnerability only affects products that are no longer supported by the maintainer.
Scores
- CVSS: 9.8 (critical)
- EPSS: 43.18% chance of exploitation in the next 30 days
- CISA KEV: Not listed
- Published: 2024-10-11
What LogPulse has for it
- Detection rule: Yes, published
- Agent check (vulnerable version): No
- Mitigation: Yes, see below
How to mitigate it
Remove the angular-base64-upload demo folder from web servers
Workaround. The demo/server.php script of angular-base64-upload before 0.1.21 stores any uploaded file, which then runs from demo/uploads. The package is no longer maintained, so removing the demo folder is the fix.
Applies to: Sites that serve the angular-base64-upload package (before 0.1.21) including its demo folder, for example from bower_components or node_modules.
- Search the web roots for angular-base64-upload/demo, for example with find / -path '*angular-base64-upload/demo*' -maxdepth 8.
- Delete the demo folder, including demo/uploads, from every web-served copy.
- Check demo/uploads for PHP files before deleting and treat any you did not put there as a compromise.
- Replace the package with a maintained upload component or build it without the demo folder.
Sources:
Source data: NIST NVD, CISA KEV and FIRST EPSS. LogPulse processes new CVEs every hour.
We build every detection with great care, but no two environments are the same. Log sources, parsing and configuration differ, so test a detection in your own environment before you rely on it.