{"id":"CVE-2019-18413","aliases":["CVE-2019-18413","GHSA-fj58-h2fr-3pp2"],"related":[],"kind":"vulnerability","state":"published","title":"SQL Injection and Cross-site Scripting in class-validator","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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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.\n\nThe default settings for `forbidUnknownValues` has been changed to `true` in 0.14.0.\n\nNOTE: 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"En TypeStack class-validator versión 0.10.2, la validación de entrada validate() puede ser omitida porque ciertos atributos internos se pueden sobrescribir por medio de un nombre en conflicto. Aunque existe un parámetro opcional forbidUnknownValues ??que puede ser utilizado para reducir el riesgo de esta omisión, esta opción no está documentada y, por lo tanto, la mayoría de los desarrolladores configuran la validación de entrada de una manera predeterminada vulnerable. Con esta vulnerabilidad, los atacantes pueden iniciar ataques de inyección SQL o de tipo XSS mediante la inyección de entradas maliciosas arbitrarias. NOTA: un mantenedor de software está de acuerdo con que el hallazgo \"is not documented\" pero sugiere que gran parte de la responsabilidad del riesgo recae en un producto diferente.","source":"nvd"}],"published":"2019-10-24T00:00:00.000Z","modified":"2026-06-17T02:24:59.297Z","severity":{"scorer":"mitre","scheme":"CVSS:3.1","vector":"CVSS:3.1/AC:H/AV:N/A:N/C:N/I:L/PR:N/S:U/UI:N","score":3.7,"rating":"LOW"},"severities":[{"scorer":"mitre","scheme":"CVSS:3.1","vector":"CVSS:3.1/AC:H/AV:N/A:N/C:N/I:L/PR:N/S:U/UI:N","score":3.7,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","score":7.5,"rating":"HIGH"}],"cwes":["CWE-79","CWE-89"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.14.0"}],"ecosystem":"npm","package":"class-validator","purl":"pkg:npm/class-validator","source":"ghsa"},{"ranges":[{"status":"affected","version":"0.10.2"}],"vendor":"typestack_class-validator_project","product":"typestack_class-validator","cpe":"cpe:2.3:a:typestack_class-validator_project:typestack_class-validator:0.10.2:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/typestack/class-validator/issues/438","tags":["exploit","issue-tracking","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/typestack/class-validator#passing-options","tags":["third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/typestack/class-validator/issues/438#issuecomment-964728471","tags":["exploit","issue-tracking","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/typestack/class-validator/issues/1422#issuecomment-1344635415","tags":["issue-tracking","release-notes","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2019-18413","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/typestack/class-validator/pull/1798","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/typestack/class-validator","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2019-18413","url":"https://www.cve.org/CVERecord?id=CVE-2019-18413","licence":"CVE Terms of Use","modified":"2024-08-05T01:54:14.412Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-fj58-h2fr-3pp2","url":"https://github.com/advisories/GHSA-fj58-h2fr-3pp2","licence":"CC-BY-4.0","modified":"2023-11-08T04:01:25.903Z"},{"source":"nvd","name":"NVD","id":"CVE-2019-18413","url":"https://nvd.nist.gov/vuln/detail/CVE-2019-18413","licence":"Public domain","modified":"2026-06-17T02:24:59.297Z"}],"updatedAt":"2026-11-25T22:57:47.674Z","epss":{"score":0.01987,"percentile":0.81202,"date":"2026-12-01T12:00:22.000Z"}}