Skip to content

← Public intelligence

npm package

joi

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

4 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. High, CVSS 8.7npmAmendedPublished

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

    CVE-2026-92599 · GHSA-6h2x-m376-mqjq

    Affected
    • npm joi >= 17.2.0, < 17.13.7; >= 18.0.0, < 18.2.6
    Fixed in
    17.13.718.2.6· Vendor fix available
    Issue
    Impact Any application that validates a user-supplied string with Joi.string().isoDate() can be stalled by a single request. One of the regular expressions the rule runs over the input was unanchored, so a valid ISO date followed by a long run of fractional-second digits made the regex engine restart its search from every position in the string, costing time proportional to the square of the input length. 64 KB of digits costs about 1.4 s and 256 KB about 22 s. Patches Upgrade to version 17.13.7 or 18.2.6 depending on your current major version. Workarounds None except capping the length of the string before it reaches joi.

    Recommended action: Upgrade to 18.2.6 or 17.13.7 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.com (1)osv.dev (2)Source checked Evidence →
  2. Medium, CVSS 6.3npmAmendedPublished

    joi messages compilation allows prototype replacement through __proto__ error codes

    CVE-2026-90771 · GHSA-wr44-6hxh-3jwq

    Affected
    • npm joi < 17.13.8; >= 18.0.0, < 18.2.9
    Fixed in
    17.13.818.2.9· Vendor fix available
    Issue
    joi before versions 17.13.8 and 18.2.9 contains a prototype pollution vulnerability in the messages compilation function that accepts proto as an error code. Attackers can supply proto keys in custom messages to replace the returned object's prototype, breaking downstream code relying on Object.prototype methods.

    Recommended action: Upgrade to 18.2.9 or 17.13.8 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.com (1)osv.dev (2)Source checked Evidence →
  3. Low, CVSS 3.7npmAmendedPublished

    joi: object().rename() with a template target can set the validated object's prototype

    CVE-2026-84367 · GHSA-gg4h-3hg2-grpc

    Affected
    • npm joi >= 16.0.0, < 17.13.5; >= 18.0.0, < 18.2.4
    Fixed in
    17.13.518.2.4· Vendor fix available
    Issue
    Impact Applications are affected only if a schema renames keys with a regular-expression source and a Joi.expression() / Joi.x() target that interpolates the pattern's own match data, combined with { multiple: true }, for example .rename(/^x-(.+)$/, Joi.x('{#1}'), { multiple: true }). Because the target is rendered from the matched input key, an attacker who controls input keys can send x-proto with an object value and make the rename target render as proto, which sets the prototype of the object joi returns instead of creating a key on it. The global Object.prototype is not modified, so the effect is confined to the object returned by that one validate() call. Schemas using a static string rename target are not affected, and neither are schemas left on the default { multiple: false }. Patches Versions 17.13.5 and 18.2.4 have been released to address the issue. Workarounds 1. Replace the template rename target with a static string target. 2. Keep the template but make the capture…

    Recommended action: Upgrade to 18.2.4 or 17.13.5 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.com (1)osv.dev (2)Source checked Evidence →
  4. Medium, CVSS 5.3npmAmendedPublished

    joi has an uncaught RangeError on deeply nested input through recursive link() schemas

    CVE-2026-48038 · GHSA-q7cg-457f-vx79

    Affected
    • npm joi >= 18.0.0, < 18.2.1; < 17.13.4
    Fixed in
    18.2.117.13.4· Vendor fix available
    Issue
    Impact Denial of service via untrapped exception in services validating user-supplied JSON / object input with recursive link schemas. The blast radius depends on how the application invokes joi: - Highest impact: validate() called without try/catch in a request handler would cause an unhandled exception, potentially crashing the process. - Lower impact: validateAsync() or validate() inside a try/catch, the validation fails, but the error type is RangeError rather than a structured ValidationError, complicating error handling. Patches Upgrade to version = 18.2.1. Workarounds Try/catch the validation to avoid uncaught exceptions. References - Pull request: hapijs/joi#3113

    Recommended action: Upgrade to 18.2.1 or 17.13.4 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →