CVE-2025-68130
Unknown Unknown - Not Provided
Prototype Pollution in tRPC `formDataToObject` Enables Authorization Bypass

Publication date: 2025-12-16

Last updated on: 2025-12-16

Assigner: GitHub, Inc.

Description
tRPC allows users to build and consume fully typesafe APIs without schemas or code generation. Starting in version 10.27.0 and prior to versions 10.45.3 and 11.8.0, a A prototype pollution vulnerability exists in `@trpc/server`'s `formDataToObject` function, which is used by the Next.js App Router adapter. An attacker can pollute `Object.prototype` by submitting specially crafted FormData field names, potentially leading to authorization bypass, denial of service, or other security impacts. Note that this vulnerability is only present when using `experimental_caller` / `experimental_nextAppDirCaller`. Versions 10.45.3 and 11.8.0 fix the issue.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-12-16
Last Modified
2025-12-16
Generated
2026-05-07
AI Q&A
2025-12-16
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 3 associated CPEs
Vendor Product Version / Range
trpc server 11.8.0
trpc server 10.27.0
trpc server 10.45.3
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-1321 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.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

CVE-2025-68130 is a prototype pollution vulnerability in the `formDataToObject` function of the `@trpc/server` package, specifically when using the experimental Next.js App Router adapter features `experimental_caller` or `experimental_nextAppDirCaller`. The vulnerability occurs because the function does not properly validate or sanitize FormData field names, allowing an attacker to submit specially crafted keys like `__proto__[isAdmin]` that modify `Object.prototype`. This pollution affects all objects in the JavaScript environment, enabling attackers to inject or override properties globally. [1]


How can this vulnerability impact me? :

This vulnerability can lead to several serious impacts: 1) Authorization Bypass: Applications that check user permissions by accessing object properties (e.g., `user.isAdmin`) can be bypassed because all objects inherit the polluted properties set by the attacker. 2) Denial of Service: Polluting critical properties like `toString` can cause application crashes or unexpected behavior. Overall, it can compromise application integrity and availability, potentially allowing attackers to escalate privileges or disrupt service. [1]


How can this vulnerability be detected on my network or system? Can you suggest some commands?

This vulnerability can be detected by monitoring for suspicious FormData submissions containing keys like '__proto__[isAdmin]' or other prototype pollution patterns in requests to tRPC mutations using Next.js Server Actions. You can inspect incoming HTTP requests for FormData fields with keys that include '__proto__', 'constructor', or 'prototype'. For example, using command-line tools like curl or tcpdump to capture traffic and grep to search for these keys in payloads. Additionally, reviewing logs or using application-level logging to detect unexpected properties on Object.prototype (e.g., checking if {}.isAdmin is set) can help identify exploitation attempts. Specific commands might include: 1) Using curl to simulate or detect malicious FormData: curl -X POST -F "__proto__[isAdmin]=true" http://yourserver/endpoint 2) Using tcpdump to capture HTTP traffic: tcpdump -A -s 0 'tcp port 80' | grep '__proto__' 3) In Node.js runtime, checking for pollution: console.log({}.isAdmin) to see if the property exists unexpectedly. [1]


What immediate steps should I take to mitigate this vulnerability?

Immediate mitigation steps include upgrading the '@trpc/server' package to version 10.45.3 or 11.8.0 or later, where the vulnerability is fixed by adding validation to prevent prototype pollution. Additionally, avoid using the experimental features 'experimental_caller' and 'experimental_nextAppDirCaller' if possible, as the vulnerability only exists when these are enabled. If upgrading immediately is not feasible, consider implementing input validation or sanitization to reject FormData keys containing '__proto__', 'constructor', or 'prototype' to prevent pollution. Monitoring and restricting access to the vulnerable endpoints can also reduce risk until a patch is applied. [1]


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart