@orpc/json-schema is vulnerable to Prototype Pollution
65
Medium Risk
JsonSchemaCoercer in the smart coercion plugin coerces request input before schema validation and mishandles object keys that name Object.prototype members. An attacker who can reach a procedure whose input schema contains an object can send keys such as __proto__ or constructor to replace the prototype of the coerced input object or make inherited members pass the coercer's satisfaction check. The effect is scoped to the single coerced value returned for that request rather than the global Object.prototype, but a handler that reads inherited properties can act on data the client never legitimately supplied. The fix collects coerced properties into a null-prototype object and restricts sub-schema lookups to own properties via Object.hasOwn.
You are affected if you are using a version that falls within the vulnerable range and your server installs the SmartCoercionPlugin with at least one procedure whose input schema contains an object.
@orpc/json-schema is vulnerable to Prototype Pollution in versions 0.0.0 - 1.14.8.
Upgrade the @orpc/json-schema library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant