Vulnerabilities in pkg:npm/@orpc/client

PACKAGE
Advisory Identifier: GHSA-m272-9rp6-32mc
Advisory Summary

CVE-2026-28794 is a CRITICAL `@orpc/client` has prototype pollution vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting @orpc/client libraries in the npm ecosystem. The issue involves `@orpc/client` has prototype pollution via `standardrpcjsonserializer` deserialization. Remediation is available by upgrading affected packages to version 1.13.6.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@orpc/client

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@orpc/client. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-m272-9rp6-32mc CVE-2026-28794 CRITICAL `@orpc/client` has Prototype Pollution via `StandardRPCJsonSerializer` Deserialization

CVE-2026-28794 at a Glance

CVE Identifier CVE-2026-28794
GHSA Identifier GHSA-m272-9rp6-32mc
Severity CRITICAL
CVSS v3.1 Base Score N/A
CWE Classification CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
Affected Product @orpc/client
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2026-28794

To remediate this vulnerability, upgrade all affected @orpc/client dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@orpc/client fixed: 1.13.6
npm install @orpc/client@1.13.6
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @orpc/client

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-28794, inspect your project dependencies using npm:

npm ls @orpc/client

Analyze the terminal output to locate any version of @orpc/client in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.13.6), your application is affected.

Note: The npm ls @orpc/client command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'), where the product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. In @orpc/client, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary A critical Prototype Pollution vulnerability exists in the RPC JSON deserializer of the `@orpc/client` package. The vulnerability allows unauthenticated, remote attackers to inject arbitrary properties into the global `Object.prototype`. Because this pollution persists for the lifetime of the Node.js process and affects all objects, it can lead to severe security breaches, including authentication bypass, denial of service, and potentially Remote Code Execution. ### Vulnerability Details The root cause lies in the `deserialize()` method of `StandardRPCJsonSerializer`. When processing attacker-controlled path segments from the `meta` and `maps` arrays, the deserializer fails to implement validation or sanitization for dangerous JavaScript object keys, specifically `__proto__` and `constructor`: https://github.com/middleapi/orpc/blob/819ed2e0897b18a5d6a4ca85ba68568f055004a1/packages/client/src/adapters/standard/rpc-json-serializer.ts#L137-L213 There are two primary distinct write vectors available to an attacker: 1. The `meta` vector: Writes type-constrained values (e.g., `Map`, `Set`, `Date`) to arbitrary object paths. 2. The `maps` vector: Allows the injection of arbitrary string values. This occurs because the return value of `getBlob(i)` (which relies on `FormData.get(i.toString())`) is cast `as Blob`. Since this is strictly a TypeScript compile-time cast, the runtime execution allows standard text fields to return as arbitrary strings. Crucially, this deserialization process occurs at the very beginning of the request lifecycle before any Zod schema validation takes place. Consequently, a malicious payload will successfully pollute the prototype even if the request is subsequently rejected by the validation layer. This issue impacts all server adapters utilizing the RPC protocol. ### Proof of Concept To reproduce the vulnerability, set up the [playgrounds/astro](https://github.com/middleapi/orpc/tree/main/playgrounds/astro) environment and start the development server using `pnpm dev`. Run the following `curl` command to send a crafted payload: ```bash curl -X POST http://localhost:4321/rpc/planet/create \ -F 'data={"json":{},"meta":[],"maps":[["__proto__","role"]]}' \ -F '0=admin' ``` Result: The deserializer evaluates `maps`, follows the `__proto__` path, and maps index `0` to the string `"admin"`. This immediately applies `Object.prototype.role = "admin"` across the entire Node.js server instance. ### Impact Servers relying on `StandardRPCJsonSerializer` for deserialization are immediately susceptible to global prototype pollution. The potential impacts including: - Privilege Escalation / Authorization Bypass: Attackers can bypass flawed security checks. For example, if the server relies on a defaulted property check like `if (user.role === "admin")`, the application will evaluate this as `true` for all users globally. - Remote Code Execution: If the application or its dependencies contain susceptible prototype pollution gadgets (e.g., dynamically executing shell commands or scripts based on object properties), this vulnerability can be leveraged into full RCE. - Denial of Service: Attackers can overwrite built-in methods (e.g., `toString`) or set objects into unexpected states, causing the application to crash or throw unhandled exceptions globally.

CVE-2026-28794 Affected @orpc/client Versions

1 component(s)
Fixed Versions:
1.13.6
Product / Package Ecosystem Affected Versions Fixed Version
@orpc/client
npm
< 1.13.6
1.13.6

References

Frequently Asked Questions

What is CVE-2026-28794?
CVE-2026-28794 is a security vulnerability in @orpc/client involving `@orpc/client` has Prototype Pollution via `StandardRPCJsonSerializer` Deserialization under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution').
Which @orpc/client versions are affected?
Affected versions include releases prior to 1.13.6 across affected packages: @orpc/client.
What version fixes CVE-2026-28794?
Upgrading to 1.13.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @orpc/client affected?
Yes, @orpc/client is affected in releases prior to 1.13.6. Upgrade your dependency to 1.13.6 or later.
What CWE is associated with CVE-2026-28794?
CVE-2026-28794 is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') (The product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype.).
How can I check npm dependencies for CVE-2026-28794?
Run the dependency tree command: 'npm ls @orpc/client'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-m272-9rp6-32mc",
  "modified" : "2026-03-06T15:16:22Z",
  "published" : "2026-03-02T21:43:00Z",
  "aliases" : [ "CVE-2026-28794" ],
  "summary" : "`@orpc/client` has Prototype Pollution via `StandardRPCJsonSerializer` Deserialization",
  "details" : "### Summary\nA critical Prototype Pollution vulnerability exists in the RPC JSON deserializer of the `@orpc/client` package. The vulnerability allows unauthenticated, remote attackers to inject arbitrary properties into the global `Object.prototype`. Because this pollution persists for the lifetime of the Node.js process and affects all objects, it can lead to severe security breaches, including authentication bypass, denial of service, and potentially Remote Code Execution.\n\n### Vulnerability Details\nThe root cause lies in the `deserialize()` method of `StandardRPCJsonSerializer`. When processing attacker-controlled path segments from the `meta` and `maps` arrays, the deserializer fails to implement validation or sanitization for dangerous JavaScript object keys, specifically `__proto__` and `constructor`:\n\nhttps://github.com/middleapi/orpc/blob/819ed2e0897b18a5d6a4ca85ba68568f055004a1/packages/client/src/adapters/standard/rpc-json-serializer.ts#L137-L213\n\nThere are two primary distinct write vectors available to an attacker:\n\n1. The `meta` vector: Writes type-constrained values (e.g., `Map`, `Set`, `Date`) to arbitrary object paths.\n2. The `maps` vector: Allows the injection of arbitrary string values. This occurs because the return value of `getBlob(i)` (which relies on `FormData.get(i.toString())`) is cast `as Blob`. Since this is strictly a TypeScript compile-time cast, the runtime execution allows standard text fields to return as arbitrary strings.\n\nCrucially, this deserialization process occurs at the very beginning of the request lifecycle before any Zod schema validation takes place. Consequently, a malicious payload will successfully pollute the prototype even if the request is subsequently rejected by the validation layer.\n\nThis issue impacts all server adapters utilizing the RPC protocol.\n\n### Proof of Concept\nTo reproduce the vulnerability, set up the [playgrounds/astro](https://github.com/middleapi/orpc/tree/main/playgrounds/astro) environment and start the development server using `pnpm dev`. \n\nRun the following `curl` command to send a crafted payload:\n\n```bash\ncurl -X POST http://localhost:4321/rpc/planet/create \\\n     -F 'data={\"json\":{},\"meta\":[],\"maps\":[[\"__proto__\",\"role\"]]}' \\\n     -F '0=admin'\n```\n\nResult: The deserializer evaluates `maps`, follows the `__proto__` path, and maps index `0` to the string `\"admin\"`. This immediately applies `Object.prototype.role = \"admin\"` across the entire Node.js server instance. \n\n### Impact\nServers relying on `StandardRPCJsonSerializer` for deserialization are immediately susceptible to global prototype pollution. The potential impacts including:\n\n- Privilege Escalation / Authorization Bypass: Attackers can bypass flawed security checks. For example, if the server relies on a defaulted property check like `if (user.role === \"admin\")`, the application will evaluate this as `true` for all users globally.\n- Remote Code Execution: If the application or its dependencies contain susceptible prototype pollution gadgets (e.g., dynamically executing shell commands or scripts based on object properties), this vulnerability can be leveraged into full RCE.\n- Denial of Service: Attackers can overwrite built-in methods (e.g., `toString`) or set objects into unexpected states, causing the application to crash or throw unhandled exceptions globally.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:L/SI:L/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@orpc/client"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.13.6"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.13.5"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/middleapi/orpc/security/advisories/GHSA-m272-9rp6-32mc"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-28794"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/middleapi/orpc/commit/1dba06fc6f938c2486de303c2fa096bc1c8418b5"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/middleapi/orpc"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1321" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-02T21:43:00Z",
    "nvd_published_at" : "2026-03-06T05:16:40Z"
  }
}