NestJS is a progressive Node.js framework built for efficient and scalable server-side applications. Versions 4.5.0 and 4.5.1 of the @nestjs/common package represent minor iterations, sharing core functionality and dependencies. Both versions rely on cli-color for console styling, class-validator for robust data validation, and class-transformer for object transformation, along with reflect-metadata as a peer dependency for reflection capabilities. The licensing and author remain consistent, indicating continuity in development practices led by Kamil Mysliwiec under the MIT license.
The key distinction lies in the release date, with version 4.5.1 published shortly after 4.5.0. This suggests that 4.5.1 likely addresses bug fixes or minor enhancements identified immediately after the 4.5.0 release. For developers, while the code changes between these versions are probably subtle, upgrading to 4.5.1 is generally recommended to ensure stability and benefit from any quick-turnaround improvements. For new NestJS projects, always aim to use the latest stable version, which incorporates all the prior enhancements and bug fixes. Investigating the changelog or commit history (if available) for more detailed insights into the specific changes within version 4.5.1 can be beneficial before updating.
All the vulnerabilities related to the version 4.5.1 of the package
nest allows a remote attacker to execute arbitrary code via the Content-Type header
File Upload vulnerability in nestjs nest prior to v.11.0.16 allows a remote attacker to execute arbitrary code via the Content-Type header.
SQL Injection and Cross-site Scripting in class-validator
In TypeStack class-validator, validate()
input validation can be bypassed because certain internal attributes can be overwritten via a conflicting name. Even though there is an optional forbidUnknownValues
parameter that can be used to reduce the risk of this bypass, this option is not documented and thus most developers configure input validation in the vulnerable default manner. With this vulnerability, attackers can launch SQL Injection or XSS attacks by injecting arbitrary malicious input.
The default settings for forbidUnknownValues
has been changed to true
in 0.14.0.
NOTE: a software maintainer agrees with the "is not documented" finding but suggests that much of the responsibility for the risk lies in a different product.
Inefficient Regular Expression Complexity in validator.js
validator.js prior to 13.7.0 is vulnerable to Inefficient Regular Expression Complexity
Prototype pollution in class-transformer
class-transformer through 0.2.3 is vulnerable to Prototype Pollution. The 'classToPlainFromExist' function could be tricked into adding or modifying properties of 'Object.prototype' using a 'proto' payload.