CVE-2019-18413 json
SQL Injection and Cross-site Scripting in class-validator
published 2019-10-24 7 y ago modified 2026-06-17 4 mo ago also GHSA-fj58-h2fr-3pp2 , EUVD-2021-2194
- cvss
- 3.7
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 2.0%
- EPSS 2.0% chance of exploitation in 30 days, percentile 80%
- public exploits
- 0
- none known
Summary
In TypeStack class-validator 0.10.2, 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.
Patch / fix
Exploit prediction
1.99% chance of exploitation in the next 30 days, higher than 80% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/typestack/class-validator/issues/438 referenced PoC, tagged "exploit" by a source, unverified
- github.com https://github.com/typestack/class-validator/issues/438#issuecomment-964728471 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 3.7 | CVSS:3.1/AC:H/AV:N/A:N/C:N/I:L/PR:N/S:U/UI:N |
| CNA | 3.1 | 3.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N |
| NVD | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
| GitHub | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | class-validator | <0.14.0 |
0.14.0 |
Classification
References
-
github.com
/typestack/class-validator/pull/1798
web
-
github.com
/typestack/class-validator/issues/438
web, exploit, issue-tracking, third-party-advisory
-
github.com
/typestack/class-validator/issues/438#issuecomment-964728471
web, exploit, issue-tracking, third-party-advisory
-
github.com
/typestack/class-validator#passing-options
web, third-party-advisory
-
github.com
/typestack/class-validator/issues/1422#issuecomment-1344635415
web, issue-tracking, release-notes, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2019-18413
advisory
-
github.com
/typestack/class-validator
package
Sources
- CVE List CVE-2019-18413
- GitHub Advisory GHSA-fj58-h2fr-3pp2
- NVD CVE-2019-18413
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.