---
id: "GHSA-jgpx-8x6j-fcpf"
page: "https://infrastack.ai/live/GHSA-jgpx-8x6j-fcpf"
kind: "vulnerability"
aliases: ["GHSA-jgpx-8x6j-fcpf"]
title: "Process crash via many files validated at once by ParseFilePipe"
severity: "high"
cvss: null
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "@nestjs/common", "fixed": ["12.5.0"], "affected": ">= 12.0.0, < 12.5.0", "ecosystem": "npm"}, {"name": "@nestjs/common", "fixed": ["11.2.10"], "affected": ">= 9.3.10, < 11.2.10", "ecosystem": "npm"}]
ecosystems: ["npm"]
tags: ["cwe-400", "cwe-770", "express", "file-upload", "nestjs", "node", "package"]
not_affected_if: ["auth-required", "disk-storage", "maxcount-set", "no-file-type-validator"]
published_at: "2026-11-12T19:03:46+00:00"
first_seen_at: "2026-11-12T19:14:24+00:00"
updated_at: "2026-11-12T19:15:49+00:00"
sources: [{"source": "ghsa-repo", "url": "https://github.com/nestjs/nest/security/advisories/GHSA-jgpx-8x6j-fcpf", "first_seen_at": "2026-11-12T19:14:24+00:00"}]
exploit_sources: []
---

# Process crash via many files validated at once by ParseFilePipe

Link for people: https://infrastack.ai/live/GHSA-jgpx-8x6j-fcpf (this .md is for agents)

A multi-file upload validated by ParseFilePipe with FileTypeValidator can make @nestjs/common hold enough memory to exhaust the heap and terminate the process. An unauthenticated request carrying many small files is enough to crash the server.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- npm:@nestjs/common affected >= 12.0.0, < 12.5.0 fixed 12.5.0
- npm:@nestjs/common affected >= 9.3.10, < 11.2.10 fixed 11.2.10

## How to check

- Check the installed version with `npm ls @nestjs/common`.
- Search the code for `ParseFilePipe` used with `FileTypeValidator` on `FilesInterceptor` without `maxCount`, or on `AnyFilesInterceptor`.
- Check whether uploads use the default in-memory storage.

## Fix

- `@nestjs/common` `11.2.10` for the 11.x line
- `@nestjs/common` `12.5.0` for the 12.x line

## Timeline

- 2026-11-12T19:14:24+00:00 ghsa-repo https://github.com/nestjs/nest/security/advisories/GHSA-jgpx-8x6j-fcpf

## Documents

- [advisory] Maintainer's advisory: github.com https://github.com/nestjs/nest/security/advisories/GHSA-jgpx-8x6j-fcpf

## From the sources

| Field | Value |
| --- | --- |
| Ecosystem | npm |
| Package | `@nestjs/common` |
| Affected versions | `>= 9.3.10, < 11.2.10` and `>= 12.0.0, < 12.5.0` |
| Patched versions | `11.2.10` and `12.5.0` |
| Severity | High |
| CVSS v3.1 | `AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H` (7.5) |
| CWE | CWE-770 (Allocation of Resources Without Limits or Throttling), CWE-400 (Uncontrolled Resource Consumption) |

### Summary

`ParseFilePipe` validated all files of a multi-file upload at the same time. With `FileTypeValidator`, a single request carrying many small files could make the server hold enough memory to exhaust the heap and terminate the process.

### Impact

An application is affected when it uses the Express or Node adapter, accepts an array of files (`FilesInterceptor` without `maxCount`, or `AnyFilesInterceptor`), keeps the uploads in memory (the default storage), and validates them with `ParseFilePipe` and `FileTypeValidator`. No authentication is needed unless a guard protects the route.

### Patches

Fixed in **11.2.10** and **12.5.0**. `ParseFilePipe` now validates the files one at a time and stops at the first invalid file.

### Workarounds

Limit the number of files per request with `maxCount`, or with `limits.files` or `limits.parts` in the upload options.

### Credit

Reported by Anthropic's OSS Scanner.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
