CVE-2024-42640 — angular-base64-upload
CRITICALCVE-2024-42640 is a critical-severity (CVSS 9.8) Unrestricted File Upload vulnerability in angular-base64-upload. 5 public exploit or proof-of-concept references are indexed, so weaponization risk is real. A fix is available for angular-base64-upload — see the affected versions and patch details below.
angular-base64-upload vulnerable to unauthenticated remote code execution
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- A successful exploit gives an attacker total control of the affected component, not partial access.
Exploitation and automatability from CISA’s SSVC triage for CVE-2024-42640.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
angular-base64-uploadnpmDescription
angular-base64-upload versions prior to v0.1.21 are vulnerable to unauthenticated remote code execution via the angular-base64-upload/demo/server.php endpoint. Exploitation of this vulnerability involves uploading arbitrary file content to the server, which can subsequently accessed through the angular-base64-upload/demo/uploads endpoint. This leads to the execution of previously uploaded content which enables the attacker to achieve code execution on the server.
NOTE: This vulnerability only affects products that are no longer supported by the maintainer.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | angular-base64-upload | all versions | 0.1.21npm install angular-base64-upload@0.1.21 |
Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Angular-Base64-Upload Library 0.1.21 - Unauthenticated Remote Code Execution (RCE)
by Ravindu Wickramasinghe · Apr 17, 2025
Angular-Base64-Upload Library 0.1.20 - Remote Code Execution (RCE)
by Ravindu Wickramasinghe · Apr 4, 2025
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for angular-base64-upload, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update angular-base64-upload to 0.1.21 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2024-42640 is resolved across your whole dependency graph.
Workarounds
Treat uploaded files as untrusted until proven otherwise: validate the actual content type rather than the supplied extension, store uploads outside the web root on a volume mounted without execute permission, and rename them to server-generated identifiers so an attacker cannot choose the path a request will later resolve.
How to detect CVE-2024-42640
A community-maintained Nuclei template exists for this CVE. You can scan for it directly:
nuclei -id cve-2024-42640 -u https://target- Template
- Angular-Base64-Upload - Remote Code Execution
- Severity
- critical
- Impact
- Unauthenticated attackers can upload arbitrary files and achieve remote code execution on the server.
- Remediation
- Upgrade angular-base64-upload to version 0.1.21 or discontinue use as the product is no longer supported.
Template by ProjectDiscovery nuclei-templates (s4e-io), MIT licensed. View the full template. Scan only systems you are authorised to test.
Frequently Asked Questions
Is CVE-2024-42640 in your dependencies?
Find it across npm, including transitive dependencies.