CVE-2025-12758 Validator is Vulnerable to Incomplete Filtering of One or More Instances of Special Elements

High 8.7 Published Updated

An attacker can bypass length validation using Unicode variation selectors, causing data truncation or denial of service in applications using the validator library.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2025-12758?

CVE-2025-12758 is a high-severity denial of service vulnerability in org.webjars.npm:validator, published on 27 Nov 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Versions of the package validator before 13.15.22 are vulnerable to Incomplete Filtering of One or More Instances of Special Elements in the isLength() function that does not take into account Unicode variation selectors (\uFE0F, \uFE0E) appearing in a sequence which lead to improper string length calculation. This can lead to an application using isLength for input validation accepting strings significantly longer than intended, resulting in issues like data truncation in databases, buffer overflows in other system components, or denial-of-service.

Weakness: CWE-172, CWE-792

Which versions are affected by CVE-2025-12758?

2 open source packages ship an affected version, including validator. It affects 1 product.

PackageAffectedFixed in
validator npmAll versions13.15.22
validator npmAll versions13.15.22

Products include Validator Project Validator.

How do I fix CVE-2025-12758?

Upgrade validator to 13.15.22 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2025-12758 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-12758 exists.

Public exploit code: 1 proofs of concept on GitHub.

Sources

Also known as CLSA-2026-1790175492, GHSA-vghf-hv5q-vc2g, MINI-4jcq-2hm2-3gxc, MINI-jv5q-pv59-w2fc, MINI-x33q-f99v-r4xw, ROOT-APP-NPM-CVE-2025-12758.

Is CVE-2025-12758 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free