
Proof-of-concept exploit for CVE-2026-21440, a critical path traversal in AdonisJS multipart uploads enabling arbitrary file write and remote code execution.
CVE-2026-21440 is a critical path traversal vulnerability affecting the AdonisJS framework, specifically its multipart file upload handling.
⚠️ If exploited, attackers can write files anywhere on the server, potentially leading to remote code execution (RCE).
| Field | Value |
|---|
| CVE ID | CVE-2026-21440 |
| Severity | 🔴 Critical |
| CVSS v4.0 | 9.2 |
| CWE | CWE-22 (Path Traversal) |
| Attack Vector | Network |
| Authentication Required | ❌ No |
AdonisJS improperly trusts user-supplied filenames during multipart file uploads.
When developers call:
MultipartFile.move()
without strict sanitization, attackers can submit filenames like:
../../../../app/config/startup.js
This allows them to escape the intended upload directory and write files to arbitrary locations on the server.
An attacker can potentially:
This makes the vulnerability especially dangerous for public file upload endpoints.
@adonisjs/bodyparser ≤ 10.1.111.x prereleases before 11.0.0-next.6➡️ Upgrade to a patched version as soon as possible.
If upgrading isn’t possible yet:
../, absolute paths, null bytes)MultipartFile.move()Install dependency
pip install requests
Save script
Copy the full Python code and save as cve_2026_21440_poc.py
Find upload endpoint
Identify the target's multipart file upload URL (e.g., /upload, /api/files). Test with browser or curl.
Run safe test first
python3 cve_2026_21440_poc.py http://target:port/upload --safe --random
Check success
If vulnerable, try shell (optional)
python3 cve_2026_21440_poc.py http://target:port/upload --shell php --depth 5
Verify shell
Access uploaded file (e.g., http://target/shell.php?cmd=whoami) for command output.
Use only on authorized targets! Start with --safe.

╔══════════════════════════════════════════════════════════════╗
║ ⚠️ DISCLAIMER ⚠️ ║
╚══════════════════════════════════════════════════════════════╝
This CVE-2026-21440 Proof-of-Concept script is provided SOLELY for educational, research, and authorized security testing purposes.
❌ You MAY use it on: • Systems you own • Systems you have explicit written permission to test
❌ You MAY NOT use it for: • Unauthorized access to any system • Illegal activities of any kind • Malicious purposes
The author and distributor assume NO liability for: • Misuse of this tool • Damage caused to systems • Legal consequences from unauthorized use
Using this script against systems without permission violates laws in most countries (e.g., CFAA in the US, Computer Misuse Act in the UK).
By using this tool, you agree to: • Take full responsibility for your actions • Comply with all applicable laws
Stay ethical. Test responsibly. Report vulnerabilities to vendors.
✦ Hack the planet — but legally ✦