Skip to main content

joi: Quadratic regular-expression backtracking in `Joi.string().isoDate()`

0
High
Published: 09/29/2026 (09/29/2026, 18:07:42 UTC)
Source: GCVE Database
Product: joi

Description

A vulnerability in the Joi validation library's isoDate string validation allows an attacker to cause a denial of service by sending a specially crafted string. The issue arises from a quadratic regular-expression backtracking problem that causes the validation to stall for a time proportional to the square of the input length. This can lead to significant application delays or stalls. Fixed versions are available in Joi 17.13.7 and 18.2.6.

CVSS v3.1

Score 7.5high

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected software

npmghsa
joi
Affected versions
>=18.0.0 <18.2.6

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/29/2026, 21:22:03 UTC

Technical Analysis

The Joi library's `Joi.string().isoDate()` validation function contains a regular expression that is unanchored, causing quadratic backtracking when processing a valid ISO date followed by a long sequence of fractional-second digits. This results in the regex engine restarting its search from every position in the input string, leading to processing times that grow quadratically with input length. For example, 64 KB of digits can cause about 1.4 seconds of delay, and 256 KB can cause about 22 seconds. This vulnerability can stall applications that validate user-supplied strings using this method. The issue is fixed in Joi versions 17.13.7 and 18.2.6. No workarounds exist other than limiting input length before validation.

Potential Impact

An attacker can cause a denial of service by sending a specially crafted string that triggers excessive regex backtracking in the isoDate validation, stalling the application for several seconds depending on input size. This impacts availability but does not affect confidentiality or integrity.

Mitigation Recommendations

Upgrade to Joi version 17.13.7 or later if using the 17.x series, or 18.2.6 or later if using the 18.x series. No other workarounds are effective except limiting the length of input strings before validation. Since patches are available, applying the official fix is the recommended mitigation.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-6h2x-m376-mqjq
Osv Schema Version
1.4.0
Ecosystems
["npm"]
Database Specific Severity
HIGH
Cvss Version
3.1

Threat ID: 6abc27cf680226ef6846f91a

Added to database: 09/29/2026, 21:04:15 UTC

Last enriched: 09/29/2026, 21:22:03 UTC

Last updated: 09/30/2026, 03:30:23 UTC

Views: 2

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses