Description

A high-severity security vulnerability has been identified in AdonisJS, a widely used full-stack Node.js framework. The issue carries a CVSS score of 9.2 and affects the framework’s file upload mechanism, potentially allowing remote attackers to overwrite arbitrary files on the server and, in certain scenarios, achieve remote code execution. Tracked as CVE-2026-21440, the flaw exists in the adonisjs/bodyparser package, which is responsible for handling multipart form data. The vulnerability arises from unsafe default behavior when saving uploaded files. If developers use the MultipartFile.move method without explicitly defining a filename, the framework relies on the client-supplied filename without proper sanitization. This value is combined with the target directory path, enabling attackers to include path traversal sequences that allow files to be written outside the intended upload location. The risk is further increased by permissive defaults that allow existing files to be overwritten. As a result, attackers could replace application code, configuration files, or startup scripts, creating a path to full server compromise depending on deployment and permission settings. Although remote code execution is not guaranteed in all environments, the potential impact is severe. The vulnerability affects adonisjs-bodyparser versions up to 10.1.1, as well as early 11.x prerelease builds prior to 11.0.0-next.6. The AdonisJS maintainers have released patched versions and strongly recommend immediate upgrades. Users should update to version 10.1.2 or 11.0.0-next.6 to mitigate the risk and review file upload implementations to ensure secure handling of user-supplied filenames.