GHSA-Q223-FC7F-XG75
Process crash when a handler returns a stream that fails before it is read
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-Q223-FC7F-XG75 divulgada | |
| Remediación | Parche 12.5.0 | @nestjs/core · 0 d desde divulgación | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
| Field | Value |
| --- | --- |
| Ecosystem | npm |
| Package | `@nestjs/core` |
| Affected versions | `>= 12.4.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-248 (Uncaught Exception) |
Summary
Since 12.4.0, a route handler may return a Node.js `Readable` stream. A stream that failed before it was read, for example `fs.createReadStream()` of a file that does not exist, raised an error that nothing handled, which terminated the process. A single `HEAD` request, or a client that disconnected before the first chunk, was enough.
Impact
Applications on 12.4.x that return a `Readable` from a handler, for a path a client can influence, and bind no interceptor to that route are affected, on every HTTP adapter. No authentication is needed unless a guard protects the route. Versions before 12.4.0 do not support returning a `Readable` this way.
Patches
Fixed in 12.5.0. The router now handles the errors of every stream it holds, including streams it stops without reading.
Workarounds
Wrap the stream in a `StreamableFile`, or check that the file exists before opening the stream.
Credit
Reported by Anthropic's OSS Scanner.
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
npm@nestjs/core |
Corregida | 12.5.0 | 0 d | 12.5.0 no afectada |
12.5.0Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/nestjs/nest/security/advisories/GHSA-q223-fc7f-xg75Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
