On November 25, 2026, NestJS shipped three releases in five and a half hours: patch v12.6.1, backport v11.2.12, and emergency hotfix v12.6.2. On the 12.x branch, jump straight from 12.6.0 to 12.6.2: the intermediate 12.6.1 release breaks TypeScript builds with TS1270 even when skipLibCheck: true is set. And if your app uses @nestjs/platform-fastify, check your container Node.js version before upgrading.
Why You Should Skip 12.6.1: The TS1270 Regression in applyDecorators()
Version 12.6.1 landed on the morning of November 25, and by afternoon it had to be replaced with 12.6.2. The culprit was applyDecorators(), the NestJS helper that combines multiple decorators into one. In 12.6.1, it was updated to return the result of nested decorators and forward the parameter index for compositions like applyDecorators(Inject(TOKEN)). The side effect broke typing: the returned function got a union type of a class constructor and a method descriptor.
Don't expect skipLibCheck: true in tsconfig.json to save you here. TS1270 fired right in user code wherever a composed decorator like SetMetadata + UseGuards was applied to a controller or method. In 12.6.2, the returned decorator gained separate call overloads for classes, methods, properties, and parameters.
import {
applyDecorators,
Inject,
SetMetadata,
UseGuards,
} from '@nestjs/common';
// In 12.6.2, works on classes and methods again without TS1270
export function Auth(role: string) {
return applyDecorators(
SetMetadata('role', role),
UseGuards(AuthGuard),
);
}
// Parameter decorator composition from 12.6.1 remains intact
export function InjectTenant() {
return applyDecorators(Inject('TENANT_SERVICE'));
}
As a result, 12.6.2 keeps parameter decorator composition from 12.6.1 without breaking existing controllers. If 12.6.1 already slipped into your lockfile, bump straight to 12.6.2.
Hang-Free Microservices: RabbitMQ DLX and MQTT Shutdown
With manual acknowledgments in RabbitMQ (noAck: false), a quiet issue existed before. ServerRMQ only sent a nack to the broker in three cases: missing handler, maxMessageSize exceeded, or unmatched wildcard routing key. If a handler threw a regular internal error (not an RpcException), the message stayed unacked until the channel closed, eating up prefetch slots and never reaching the Dead Letter Exchange (DLX). Version 12.6.1 adds nackOnInternalError: when true, internal errors send nack with requeue: false straight to the DLX.
import { NestFactory } from '@nestjs/core';
import { MicroserviceOptions, Transport } from '@nestjs/microservices';
import { AppModule } from './app.module';
async function bootstrap() {
const app = await NestFactory.createMicroservice<MicroserviceOptions>(
AppModule,
{
transport: Transport.RMQ,
options: {
urls: ['amqp://localhost:5672'],
queue: 'orders_queue',
noAck: false,
// Non-RpcException sends nack without requeue (straight to DLX)
nackOnInternalError: true,
},
},
);
await app.listen();
}
By default, nackOnInternalError is false for backward compatibility. Turn it on only when noAck: false and your queue has a DLX configured.
If your RabbitMQ queue has no x-dead-letter-exchange set, a nack with requeue: false will simply drop the failed message. Check your queue arguments on the broker before rolling out this flag.
Version 12.6.2 fixed another RabbitMQ trap: after a reconnect, a nack for an old message could go out on the new channel, causing the broker to close it with PRECONDITION_FAILED - unknown delivery tag. Now the rejection strictly goes to the original channel. Also in 12.6.1, setting exchangeType: 'fanout' without an explicit exchange makes the server create a fanout exchange named after the queue (and fail on startup if types conflict). In MQTT (12.6.2), close() no longer hangs forever if the broker drops while QoS 1 packets are in flight; 12.6.1 also fixed close race conditions for Redis, Kafka, gRPC, and TCP, plus object headers in NatsRecordBuilder.setHeaders().
Security and Validation: Hidden Slots in ConsoleLogger, proto, and Yearless Dates
Secret redaction in ConsoleLogger exposed a nasty JavaScript quirk. Web objects like Headers, URL, URLSearchParams, and FormData store data in internal slots rather than ordinary enumerable properties. The old redactor looped over Object.keys(), found nothing, and then util.inspect() and JSON.stringify() printed authorization: 'Bearer SECRET' and URL passwords in plain text. In 12.6.1 (PR #18670 and PR #18692), redact learned to inspect these types, hide error and suppressed fields on SuppressedError, and cache timestamp formatting once per second.
Diagram of credential masking and inspection of hidden internal slots in logs
import { ConsoleLogger } from '@nestjs/common';
const logger = new ConsoleLogger({
redact: ['authorization', 'password', 'token'],
});
// Since 12.6.1, internal slots of Headers and URL are redacted too
logger.log({
headers: new Headers({ authorization: 'Bearer SECRET' }),
url: new URL('https://admin:hunter2@example.com/cb?token=abc'),
});
You can now log raw fetch objects without rebuilding them into JSON manually—tokens in headers and query params stay masked.
Validation and upload defenses were tightened as well. In @nestjs/platform-express, multipart fields named __proto__ or constructor[prototype] are now rejected with HTTP 400 (Invalid field name), blocking prototype pollution just like @nestjs/platform-node already did. Upload limits (parts, fieldNestingDepth, fieldArrayIndexLimit, and jsonFieldsSize in Fastify) are now guarded against NaN: previously, a bad env var in Express and Node silently disabled the limit while Fastify crashed on boot; now defaults apply, and maxCount: NaN in Fastify rejects files.
ParseDatePipe in 12.6.1 and 12.6.2 stopped accepting "rolling" dates that new Date() silently shifts to the next month: 2/30/2024, Feb 30, 2024, 4/31/24, 2024 02 30, as well as yearless dates like Feb 30, Sep 31, and even Feb 29 (without a year, the engine assumes non-leap year 2001). If client forms send month and day without a year, test them before upgrading. Other nice touches: exceptions in Socket.IO allowRequest are now logged and reject the client instead of hitting global handlers, ParseEnumPipe prefers the string '0' over the number 0, ParseArrayPipe with stopAtFirstError: false collects custom errors again, and 12.6.2 improved subclass metadata warnings under tsx/esbuild.
HTTP Adapters: Streams in platform-node and Node.js Floor for Fastify
Migrating from Fastify to @nestjs/platform-node used to expose a dangerous bug. In Fastify, reply.send(fs.createReadStream(...)) streams the file, whereas in platform-node before 12.6.2, res.send(stream) serialized the ReadStream object into JSON—leaking the server file path, flags, and mode to the client while leaving the file descriptor open. In 12.6.2 (PR #18702), res.send() pipes Readable streams with a default application/octet-stream: pre-start errors return 500, mid-stream failures abort the response, and client disconnects destroy the stream.
import { Controller, Get, Res } from '@nestjs/common';
import { createReadStream } from 'node:fs';
@Controller('files')
export class FilesController {
@Get('report')
download(@Res() res: any) {
res.setHeader('Content-Type', 'application/pdf');
// In 12.6.2, platform-node pipes the stream instead of JSON-serializing it
return res.send(createReadStream('/var/data/report.pdf'));
}
}
12.6.2 also fixed StreamableFile for 204, 205, and 304 statuses: Express and Node don't even read the stream for them, and Fastify now sends an empty body for 205 Reset Content.
The biggest deployment gotcha affects @nestjs/platform-fastify across both 12.6.x and backport 11.2.12. Both releases bumped @fastify/middie to 9.3.9. You shouldn't skip this update: 9.3.7 patched three path-scoped middleware bypasses (CVE-2026-132131 / GHSA-hfwp-44m5-9364 and CVE-2026-132128 / GHSA-r5h5-r25j-5vhr), and 9.3.8–9.3.9 added 400 (FST_ERR_MIDDIE_MALFORMED_URL) on malformed URLs and fixed plugin middleware.
However, starting with @fastify/middie 9.3.7, the package loads the ESM-only path-to-regexp 9 via require(). Native require(esm) support only arrived in Node.js 20.19+ and 22.12+, so older patch versions will crash on startup.
| Node.js Version | @nestjs/platform-fastify 12.6.x / 11.2.12 | Action |
|---|---|---|
20.18 and below | Startup crash (ERR_REQUIRE_ESM) | Upgrade image to 20.19+ |
20.19+ | Works normally | Upgrade NestJS as usual |
22.11 and below | Startup crash (ERR_REQUIRE_ESM) | Upgrade image to 22.12+ |
22.12+ / 24+ | Works normally | Upgrade NestJS as usual |
Pinning @fastify/middie back to 9.3.6 with overrides to keep an old Docker image isn't safe—you'd bring back both middleware bypass vulnerabilities from 9.3.7. The only clean path is to bump the Node.js patch version in CI and containers first, then deploy the new NestJS.
