CVE-2026-21440 — @adonisjs/bodyparser
Fix: adonisjs/bodyparser@143a16fCVE-2026-21440 is a Path Traversal vulnerability in @adonisjs/bodyparser. 1 public exploit reference exists, so weaponization risk is real. A fix is available for @adonisjs/bodyparser — see the affected versions and patch details below.
AdonisJS Path Traversal in Multipart File Handling
Exploitation Status
No confirmed exploitation observed yet
- A successful exploit gives an attacker total control of the affected component, not partial access.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-21440.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
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.
@adonisjs/bodyparsernpmDescription
Summary
Description A Path Traversal (CWE-22) vulnerability in AdonisJS multipart file handling may allow a remote attacker to write arbitrary files to arbitrary locations on the server filesystem. This impacts @adonisjs/bodyparser through version 10.1.1 and 11.x prerelease versions prior to 11.0.0-next.6. This issue has been patched in @adonisjs/bodyparser versions 10.1.2 and 11.0.0-next.6.
Details
AdonisJS parses multipart/form-data via BodyParser and exposes uploads as MultipartFile. The issue is in the MultipartFile.move(location, options) default options. If options.name isn't provided, it defaults to the unsanitized client filename and builds the destination with path.join(location, name), allowing a traversal to escape the default or intended directory chosen by the developer. If options.overwrite isn't provided, it defaults to true, allowing file overwrites. The documentation previously demonstrated examples leading developers to this vulnerable code path.
Impact
Exploitation requires a reachable upload endpoint. If a developer uses MultipartFile.move() without the second options argument or without explicitly sanitizing the filename, an attacker can supply a crafted filename value containing traversal sequences, writing to a destination path outside the intended upload directory. This can lead to arbitrary file write on the server.
If the attacker can overwrite application code, startup scripts, or configuration files that are later executed/loaded, RCE is possible. RCE is not guaranteed and depends on filesystem permissions, deployment layout, and application/runtime behavior.
Patches
Fixes targeting v6 and v7 have been published below.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | @adonisjs/bodyparser | all versions | 10.1.2npm install @adonisjs/bodyparser@10.1.2 |
| 📦npm | @adonisjs/bodyparser | ≥ 11.0.0-next.0&&< 11.0.0-next.6 | 11.0.0-next.6npm install @adonisjs/bodyparser@11.0.0-next.6 |
Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @adonisjs/bodyparser, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update @adonisjs/bodyparser to 10.1.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-21440 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like CVE-2026-21440 can be triaged on real exposure rather than presence alone.
Tailored to CVE-2026-21440. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is CVE-2026-21440 in your dependencies?
O3 Security finds CVE-2026-21440 across npm dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.