Affected versions
npmjoi
- Affected versions
- < 17.13.4
- Fixed version
- 17.13.4
npmjoi
- Affected versions
- >= 18.0.0, < 18.2.1
- Fixed version
- 18.2.1
Red HatGatekeeper 3/joi
- Affected versions
- Unknown
- Fixed version
- Not reported
- Affected versions
- Unknown
- Fixed version
- Not reported
- Affected versions
- Unknown
- Fixed version
- Not reported
- Affected versions
- Unknown
- Fixed version
- Not reported
- Affected versions
- Unknown
- Fixed version
- Not reported
- Affected versions
- Unknown
- Fixed version
- Not reported
Exploitation
Description
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 withouttry/catchin a request handler would cause an unhandled exception, potentially crashing the process.Lower impact:
validateAsync()orvalidate()inside atry/catch, the validation fails, but the error type isRangeErrorrather than a structuredValidationError, 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
Links
Credits
- kexwin

