CVE-2025-66020: Valibot ReDoS Vulnerability in EMOJI_REGEX

valibot Updated 26 Nov 2025

Summary

26/11/2025
Yes i
High
7.5

CVE-2025-66020: Valibot has a ReDoS vulnerability in EMOJI_REGEX. Affects valibot versions >= 0.31.0, < 1.2.0. Fixed in 1.2.0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Valibot is a validation library for JavaScript that provides various validation functions, including emoji validation. It is widely used in applications that require user input validation to ensure data integrity and security. The library's emoji action utilizes a regular expression (EMOJI_REGEX) to validate emoji characters in user inputs. However, a vulnerability has been identified in this regex pattern, making it susceptible to Regular Expression Denial of Service (ReDoS) attacks.

Vulnerability Detail

The vulnerability arises from catastrophic backtracking in the EMOJI_REGEX due to overlapping character classes. Specifically, the regex pattern includes ambiguous classes like \p{Emoji_Presentation} and more specific classes such as [\u{1F1E6}-\u{1F1FF}]. When a crafted input string is provided that nearly matches the regex, the regex engine can enter an exponential number of backtracking paths, leading to excessive CPU consumption and potential Denial of Service (DoS) for applications using Valibot's emoji validation.

How To Fix

Minimum fixed version

1.2.0

This is the first release that contains the fix.

npm install valibot@1.2.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If immediate upgrading is not feasible, consider implementing input length restrictions or filtering out potentially malicious input before passing it to the Valibot validation. However, the best approach is to update to the patched version as soon as possible.

Conclusion

The CVE-2025-66020 vulnerability in Valibot's EMOJI_REGEX poses a significant risk of Denial of Service due to regex backtracking issues. It is crucial for developers using Valibot to update to version 1.2.0 or later to mitigate this risk and ensure the stability of their applications.

See every vulnerability recorded for valibot →

Share this vulnerability

FAQ

A ReDoS (Regular Expression Denial of Service) attack exploits vulnerabilities in regex patterns, causing excessive CPU usage and potentially crashing the application.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. Check your package-lock.json file with Vulert's playground at Vulert Scanner to see if your application is affected.

Symptoms include significant delays in processing user inputs that contain emojis, leading to potential application unresponsiveness or crashes.

While the primary risk is Denial of Service, it does not directly lead to data loss. However, prolonged downtime can affect user experience and data availability.

Implement input validation to restrict the length and content of user inputs, and prioritize updating to the patched version of Valibot as soon as possible.

Related vulnerabilities

Recent vulnerabilities recorded for valibot.

How To Fix

Minimum fixed version

1.2.0

This is the first release that contains the fix.

npm install valibot@1.2.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback