High Severity Regular Expression Denial of Service in Joi Package

joi Updated 06 Oct 2026

Summary

17/09/2026
HIGH
No i
High
7.5

GHSA-mrx9-2rrp-rhpx: Duplicate Advisory: joi: Quadratic regular-expression backtracking in Joi.string().isoDate(). Affects joi versions >= 18.0.0. No fix is published. 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 Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Joi is a popular validation library for JavaScript, primarily used in Node.js applications. It provides a powerful and flexible way to validate data structures, ensuring that inputs conform to specified formats. The library is widely utilized in frameworks like hapi.js, making it a critical component for many web applications. However, certain versions of Joi are vulnerable to a specific denial of service attack due to inefficient regular expression handling.

Vulnerability Detail

The vulnerability arises from a quadratic regular-expression backtracking issue in the Joi.string().isoDate() validation rule. This flaw allows an attacker to craft an input that, while appearing valid, causes the regex engine to perform excessive backtracking. As a result, the application can experience significant delays, potentially stalling or crashing under certain conditions. The affected versions of Joi are those between 17.2.0 and 17.13.7, as well as between 18.0.0 and 18.2.6.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, you can limit the length of the input string before it reaches Joi for validation. For example, you can implement a check in your code like this: if (inputString.length > 1000) { throw new

Error('Input too long');

} This will prevent excessively long strings from being processed by the Joi validation.

Conclusion

In summary, the Joi package has a high-severity vulnerability related to regular expression denial of service, affecting specific versions. It is crucial to update to the latest patched versions to mitigate this risk. Additionally, implementing input length checks can serve as a temporary workaround while transitioning to the fixed versions.

See every vulnerability recorded for joi →

Share this vulnerability

FAQ

The affected versions are Joi versions >=17.2.0 <17.13.7 and >=18.0.0 <18.2.6.

The CVSS score of this vulnerability is 7.5, indicating a high severity level.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. You can check your application using the Vulert playground without any signup.

An attacker can exploit this vulnerability to stall the application, leading to denial of service and potential downtime.

Yes, the permanent fix is to update to the patched versions of Joi: 17.13.7 or 18.2.6.

Related vulnerabilities

Recent vulnerabilities recorded for joi.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. 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