Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. class-validator
  4. ›
  5. CVE-2019-18413

CVE-2019-18413: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

October 12, 2021 (updated November 12, 2021)

In TypeStack class-validat, 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. 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.

References

  • github.com/advisories/GHSA-fj58-h2fr-3pp2
  • github.com/typestack/class-validator
  • github.com/typestack/class-validator/issues/438
  • github.com/typestack/class-validator/issues/438
  • nvd.nist.gov/vuln/detail/CVE-2019-18413

Code Behaviors & Features

Detect and mitigate CVE-2019-18413 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions up to 0.13.1

Solution

Unfortunately, there is no solution available yet.

Impact 9.8 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
  • CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

Source file

npm/class-validator/CVE-2019-18413.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:52 +0000.