Intel

AIKIDO-2026-983198

@orpc/zod is vulnerable to Prototype Pollution

Prototype PollutionGHSA-gcgf-fh7c-8gf2 Published 6 days ago

65

Medium Risk

This Affects:

JS@orpc/zod
0.0.1 - 1.14.9
Fixed in 1.14.10
Are you affected? Scan for Free

TL;DR

ZodSmartCoercionPlugin and its experimental variant coerce request input before validation and mishandle object keys that name Object.prototype members. A client reaching a procedure whose input schema contains an object or record can send a key such as __proto__ to replace the prototype of the coerced value, or a key such as constructor to trigger an unhandled TypeError that fails the request. The effect is scoped to the coerced value for that request and does not modify the global Object.prototype, but a handler reading inherited properties can act on attacker-controlled data. The fix collects coerced object and record properties into a null-prototype object and guards shape lookups with Object.hasOwn.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and your server installs the ZodSmartCoercionPlugin or its experimental variant with at least one procedure whose input schema contains an object or record.

Background info

@orpc/zod is vulnerable to Prototype Pollution in versions 0.0.1 - 1.14.9.

How to fix this

Upgrade the @orpc/zod library to the patch version.