Technical impact
The vulnerability occurs when the Joi.string().email({ multiple: true }) rule processes attacker-controlled values. The rule’s separator regular expression contains a leading whitespace quantifier that is retried at each position in a long run of whitespace that contains no separator, causing a quadratic-time split operation. This excessive computational work can block the Node.js event loop for seconds, preventing the application from handling other requests and effectively causing a denial of service. The weakness is an instance of excessive or exponential processing complexity (CWE-1333).
Affected Systems
Affected vendors include @hapi:joi and hapijs:joi. The issue exists in Joi versions from 17.1.1 up to 17.13.8, and in earlier 18.x releases prior to 18.3.1. The vulnerability was fixed in Joi v17.13.9 and v18.3.1 and later releases.
Risk and Exploitability
The CVSS score is 7.5, indicating a high impact. EPSS data is not available, and the vulnerability is not listed in CISA’s KEV catalog. The primary attack vector is through any code path that validates attacker-supplied data using Joi.string().email({ multiple: true }). An attacker can send a specially crafted string with extensive whitespace to force the quadratic operation, leading to a temporary denial of service. The risk is significant for high-traffic services and for applications that rely on Joi for trustable data validation.
Github GHSA