Intel

AIKIDO-2026-180615

@nestjs/cli is vulnerable to Path Traversal

Path Traversal Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published 6 days ago

68

Medium Risk

This Affects:

JS@nestjs/cli
7.0.0 - 11.0.21
Fixed in 11.0.22
Are you affected? Scan for Free

TL;DR

The Nest CLI build pipeline resolves compilerOptions.assets[].outDir, deleteOutDir targets, and tsBuildInfoFile paths without verifying they stay inside the project workspace. A malicious or misconfigured nest-cli.json or tsconfig can make nest build copy assets to, or recursively delete files in, directories outside the checkout. Before the fix, parent-directory traversal and absolute external paths were accepted. The patch resolves each destination against the project root and aborts before any copy or deletion when the path equals the root or escapes the workspace.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

@nestjs/cli is vulnerable to Path Traversal in versions 7.0.0 - 11.0.21.

How to fix this

Upgrade the @nestjs/cli library to the patch version.