joi@17.12.3

Object schema validation

  • latest version

    18.2.9

  • latest non vulnerable version

  • first published

    13 years ago

  • latest version published

    8 hours ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the joi package. This does not include vulnerabilities belonging to this package’s dependencies.

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    Fix for free
    VulnerabilityVulnerable Version
    • M
    Prototype Pollution

    Affected versions of this package are vulnerable to Prototype Pollution in the rename method. An attacker can manipulate the prototype of the validated object by supplying specially crafted input keys that are interpreted as __proto__, leading to unintended property inheritance or behavior in the returned object.

    Note: This is only exploitable if the schema uses a regular-expression source with a template target and the { multiple: true } option enabled.

    How to fix Prototype Pollution?

    Upgrade joi to version 17.13.5, 18.2.4 or higher.

    >=14.3.1 <17.13.5>=18.0.0 <18.2.4
    • M
    Prototype Pollution

    Affected versions of this package are vulnerable to Prototype Pollution via the compile and merge functions in lib/messages.js, where a language key named __proto__ or constructor in a user-supplied messages object causes writes to flow onto Object.prototype rather than the intended target object. An attacker who can control the messages configuration passed to joi can pollute the prototype chain of all objects in the process, potentially altering application behaviour.

    How to fix Prototype Pollution?

    Upgrade joi to version 17.13.6, 18.2.5 or higher.

    >=17.2.0 <17.13.6>=18.0.0 <18.2.5
    • M
    Uncaught Exception

    Affected versions of this package are vulnerable to Uncaught Exception through the link validation. An attacker can cause the application to crash or become unresponsive by submitting deeply nested input that triggers an unhandled RangeError exception. This is only exploitable if input validation is performed without proper exception handling (such as missing try/catch blocks).

    How to fix Uncaught Exception?

    Upgrade joi to version 17.13.4, 18.2.1 or higher.

    <17.13.4>=18.0.0 <18.2.1