# CVE-2019-18413: SQL Injection and Cross-site Scripting in class-validator

- Severity: Low 3.7 (CVSS:3.1, scored by mitre) `CVSS:3.1/AC:H/AV:N/A:N/C:N/I:L/PR:N/S:U/UI:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.99%, higher than 81% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2019-10-24T00:00:00.000Z
- Modified: 2026-06-17T02:24:59.297Z
- Also known as: GHSA-fj58-h2fr-3pp2
- Weaknesses: CWE-79, CWE-89
- Assigned by: mitre

## Description

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.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- class-validator (npm): before 0.14.0
- typestack_class-validator_project typestack_class-validator: 0.10.2

## Every score

- mitre: CVSS:3.1 3.7 Low `CVSS:3.1/AC:H/AV:N/A:N/C:N/I:L/PR:N/S:U/UI:N`
- GitHub: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 7.5 High `AV:N/AC:L/Au:N/C:P/I:P/A:P`

## References

- <https://github.com/typestack/class-validator/issues/438> (exploit, issue-tracking, third-party-advisory, web)
- <https://github.com/typestack/class-validator/issues/438#issuecomment-964728471> (exploit, issue-tracking, third-party-advisory, web)
- <https://github.com/typestack/class-validator#passing-options> (third-party-advisory, web)
- <https://github.com/typestack/class-validator/issues/1422#issuecomment-1344635415> (issue-tracking, release-notes, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2019-18413> (advisory)
- <https://github.com/typestack/class-validator/pull/1798> (web)
- <https://github.com/typestack/class-validator> (package)

## Sources

- CVE List: [CVE-2019-18413](https://www.cve.org/CVERecord?id=CVE-2019-18413), CVE Terms of Use, modified 2024-08-05
- GitHub Advisory Database: [GHSA-fj58-h2fr-3pp2](https://github.com/advisories/GHSA-fj58-h2fr-3pp2), CC-BY-4.0, modified 2023-11-08
- NVD: [CVE-2019-18413](https://nvd.nist.gov/vuln/detail/CVE-2019-18413), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2019-18413 · Whole record: https://cve.day/CVE-2019-18413.json · Rebuilt by cve.day 2026-11-25T22:57:47.674Z
