Vulnerability Information
Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.
Vulnerability Title
joi: object().rename() with a template target can set the validated object's prototype
Vulnerability Description
joi is a schema description language and data validator for JavaScript. From 16.0.0 until 17.13.5 and 18.2.4, joi's lib/types/keys.js internals.rename() implementation used by object().rename() permits a schema that renames keys with a regular-expression source and a Joi.expression() or Joi.x() target that interpolates the pattern's own match data, combined with { multiple: true }, to derive a target from an attacker-controlled input key. An attacker can send x-__proto__ with an object value, causing the target to render as __proto__ and set the prototype of the object returned by validate() instead of creating an own key. The global Object.prototype is not modified, so the effect is confined to the object returned by that validation call. Static-string targets and schemas using the default { multiple: false } are not affected. This issue is fixed in versions 17.13.5 and 18.2.4.
CVSS Information
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
Vulnerability Type
CWE-1321
Vulnerability Title
hapi.js joi 输入验证错误漏洞
Vulnerability Description
hapi.js joi是hapi.js团队的一款JavaScript对象模式验证库。 hapi.js joi 16.0.0至17.13.5之前版本和18.0.0至18.2.4之前版本存在输入验证错误漏洞,该漏洞源于lib/types/keys.js中的internals.rename()实现未正确处理正则表达式重命名,结合{ multiple: true },允许攻击者通过构造x-__proto__输入键将目标渲染为__proto__,导致validate()返回对象的原型被修改,造成原型污染。
CVSS Information
N/A
Vulnerability Type
N/A