---
id: "GHSA-h94v-c5rc-3pxm"
page: "https://infrastack.ai/live/GHSA-h94v-c5rc-3pxm"
kind: "vulnerability"
aliases: ["GHSA-h94v-c5rc-3pxm"]
title: "Process crash via multipart fields parsed as JSON on the Fastify adapter"
severity: "high"
cvss: null
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "@nestjs/platform-fastify", "fixed": ["12.5.0"], "affected": ">= 12.1.0, < 12.5.0", "ecosystem": "npm"}]
ecosystems: ["npm"]
tags: ["cwe-400", "cwe-770", "fastify", "nestjs", "node", "package", "self-hosted"]
not_affected_if: ["auth-required", "express-adapter", "no-multipart-uploads"]
published_at: "2026-11-12T19:03:56+00:00"
first_seen_at: "2026-11-12T19:14:24+00:00"
updated_at: "2026-11-12T19:15:44+00:00"
sources: [{"source": "ghsa-repo", "url": "https://github.com/nestjs/nest/security/advisories/GHSA-h94v-c5rc-3pxm", "first_seen_at": "2026-11-12T19:14:24+00:00"}]
exploit_sources: []
---

# Process crash via multipart fields parsed as JSON on the Fastify adapter

Link for people: https://infrastack.ai/live/GHSA-h94v-c5rc-3pxm (this .md is for agents)

Upload interceptors in @nestjs/platform-fastify/multipart accept unlimited multipart field data sent as application/json and keep the parsed objects for the whole request. A request within default limits can exhaust the heap and terminate the process, causing denial of service.

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

## Affected

- npm:@nestjs/platform-fastify affected >= 12.1.0, < 12.5.0 fixed 12.5.0

## How to check

- Check the installed version with `npm ls @nestjs/platform-fastify`; versions `>= 12.1.0` and `< 12.5.0` are affected.
- Look for imports from `@nestjs/platform-fastify/multipart` (upload interceptors such as FileInterceptor) on routes that accept uploads.

## Fix

- `@nestjs/platform-fastify` `12.5.0`: JSON fields are limited to 1 MiB in total by default (`limits.jsonFieldsSize`), and larger requests are rejected with 400.
- Workaround from the advisory: lower `limits.parts` and `limits.fieldSize` for upload routes, or limit request body sizes in a reverse proxy.

## Timeline

- 2026-11-12T19:14:24+00:00 ghsa-repo https://github.com/nestjs/nest/security/advisories/GHSA-h94v-c5rc-3pxm

## Documents

- [advisory] Maintainer's advisory: github.com https://github.com/nestjs/nest/security/advisories/GHSA-h94v-c5rc-3pxm

## From the sources

| Field | Value |
| --- | --- |
| Ecosystem | npm |
| Package | `@nestjs/platform-fastify` |
| Affected versions | `>= 12.1.0, < 12.5.0` |
| Patched versions | `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

The upload interceptors of `@nestjs/platform-fastify/multipart` accepted any amount of multipart field data sent as `application/json`, which is parsed into objects that are kept for the whole request. A request within the default limits could exhaust the heap and terminate the process.

### Impact

Applications using the Fastify adapter with any upload interceptor from `@nestjs/platform-fastify/multipart` at the default limits are affected. No authentication is needed unless a guard protects the route. The Express and Node adapters are not affected.

### Patches

Fixed in **12.5.0**. The JSON fields of a request are limited to 1 MiB in total by default (`limits.jsonFieldsSize`), and a request over the limit is rejected with 400.

### Workarounds

Lower `limits.parts` and `limits.fieldSize` for upload routes, or limit request body sizes in a reverse proxy.

### 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_
