Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
CRITICAL severity

CVE-2019-18413 — class-validator

CRITICALFix: typestack/class-validator#1798

CVE-2019-18413 is a critical-severity (CVSS 9.8) Cross-site Scripting (XSS) vulnerability in class-validator. 2 public exploit references exist, so weaponization risk is real. A fix is available for class-validator — see the affected versions and patch details below.

SQL Injection and Cross-site Scripting in class-validator

Also known asGHSA-fj58-h2fr-3pp2
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
2 known
Exploitation data as of Oct 10, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
2.0%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs80th percentile — riskier than 80% of all scored CVEsHighest risk
0.00%0.85%1.70%2.55%0.1%2.0%Apr 26Aug 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

CVE-2019-18413 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.

Where this sits among everything scored

Of 385,738 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

1 pkg affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

7Kother npm packages depend on this — each one inherits the vulnerability until it's patched upstream
class-validatornpm
12.4Mdownloads / week

Description

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.

The default settings for forbidUnknownValues has been changed to true in 0.14.0.

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.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npmclass-validatorall versions0.14.0npm install class-validator@0.14.0

Affected Products

1 product · 1 configurations
Application
typestack class-validatortypestack_class-validator_project
1 version
0.10.2
Exploits & PoCs
2

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for class-validator, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update class-validator to 0.14.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2019-18413 is resolved across your whole dependency graph.

  3. Workarounds

    Until you can upgrade, make sure every query built from user input uses parameterised statements or a prepared-statement API rather than string concatenation, and reduce the database account's privileges so an injected query cannot read or alter data beyond what the feature needs.

Frequently Asked Questions

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. The default settings for `forbidUnknownValues` has been changed to `true` in 0.14.0. NOTE: a so
O3 Security · Impact-Aware SCA

Is CVE-2019-18413 in your dependencies?

Find it across npm, including transitive dependencies.

CVE-2019-18413: class SQL Injection — Fixed in 0.14.0