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

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

- **Severity:** High 8.7 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:P`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 27 Nov 2025
- **Updated:** 8 Aug 2026
- **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

## 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 (Improper Encoding or Decoding of Data), CWE-792 (Incomplete Filtering of One or More Instances of Special Elements)

## Which versions are affected by CVE-2025-12758?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `validator` | npm | All versions | 13.15.22 |
| `validator` | npm | All versions | 13.15.22 |

Products: Validator Project Validator.

## How do I fix CVE-2025-12758?

Upgrade validator to 13.15.22 or later.

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

- https://github.com/open-flaw/CVE-2025-12758 (github_poc): https://github.com/open-flaw/CVE-2025-12758

## Other vulnerabilities in org.webjars.npm:validator

- [CVE-2025-56200](https://insights.sbomify.com/CVE-2025-56200/): validator.js has a URL validation bypass vulnerability in its isURL function (medium 6.1)
- [CVE-2021-3765](https://insights.sbomify.com/CVE-2021-3765/): Inefficient Regular Expression Complexity in validatorjs/validator.js (medium 5.3)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-12758 and fix it if it is affected.

What it is: 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.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-12758 exists.

Affected packages and fixed versions:
- validator (npm): affected all versions; fixed in 13.15.22
- validator (npm): affected all versions; fixed in 13.15.22

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-12758/ (Markdown: https://insights.sbomify.com/CVE-2025-12758/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-12758
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-12758
- OSV: https://osv.dev/vulnerability/CVE-2025-12758

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-12758/
Summaries are generated and may contain mistakes; the official description above is the record.
