Docker-based reproduction lab for CVE-2026-21440. A path traversal / arbitrary file write vulnerability in @adonisjs/bodyparser ≤10.1.1.
A minimal reproduction lab for a path traversal / arbitrary file write vulnerability in
@adonisjs/bodyparser, running the
vulnerable AdonisJS v6 app inside a Docker container.
This repository was built for the Network Security term project at National Yang Ming Chiao Tung University (NYCU), Fall 2026 semester.
@adonisjs/bodyparser <= 10.1.1 (and 11.0.0-next.1 – 11.0.0-next.5) uses the
attacker-controlled multipart filename as the stored filename when
MultipartFile.move() is called without an explicit name option. Because the destination
path is built with path.join(), a filename containing ../ segments escapes the intended
upload directory. Combined with overwrite defaulting to true, this lets an unauthenticated
remote attacker write or overwrite arbitrary files on the server.
@adonisjs/[email protected] / 11.0.0-next.6.
├── Dockerfile # node:20-slim image, pins bodyparser to 10.1.1
├── docker-compose.yml # single app service, port 3333
├── demo.sh # PoC script: baseline upload + traversal upload
├── marker.txt # harmless file used as the PoC payload
└── app/ # minimal AdonisJS v6 app
├── package.json # overrides @adonisjs/bodyparser to 10.1.1
└── start/routes.ts # vulnerable /upload route
docker compose up --build -d
./demo.sh
The script uploads marker.txt normally, then re-uploads it with
filename=../../pwned.txt. On a vulnerable build, pwned.txt lands outside uploads/,
confirming the directory escape.
For educational / research use in a controlled lab environment only.