CVE-2026-21440
JSON

9.2critical

AdonisJS Path Traversal in Multipart File Handling

Severity
9.2critical CVSS:4.0 by GitHub_M
Exploit likelihood
1.03% (higher than 64% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-gvq6-hvvp-h34h

Description

AdonisJS is a TypeScript-first web framework. A Path Traversal 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.

Affected

Product or packageVersionsReported by
adonisjs core< 10.1.2, >= 11.0.0-next.0, < 11.0.0-next.6CVE List
@adonisjs/bodyparser (npm)before 10.1.2, from 11.0.0-next.0 before 11.0.0-next.6GitHub Advisory Database

All scores

GitHub_M9.2critical CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
GitHubcritical CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Classification

CWE-22

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

AdonisJS is a TypeScript-first web framework. A Path Traversal 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.

GitHub Advisory Database
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.

NVD (es)

AdonisJS es un web framework con prioridad en TypeScript. Una vulnerabilidad de salto de ruta en el manejo de archivos multipart de AdonisJS puede permitir a un atacante remoto escribir archivos arbitrarios en ubicaciones arbitrarias en el sistema de archivos del servidor. Esto afecta a @adonisjs/bodyparser hasta la versión 10.1.1 y a las versiones preliminares 11.x anteriores a la 11.0.0-next.6. Este problema ha sido parcheado en las versiones 10.1.2 y 11.0.0-next.6 de @adonisjs/bodyparser.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-21440 changed 2026-01-05CVE Terms of Use
GitHub Advisory DatabaseGHSA-gvq6-hvvp-h34h changed 2026-02-03CC-BY-4.0
NVDCVE-2026-21440 changed 2026-06-17Public domain