CVE-2026-33331 oRPC: Stored XSS in OpenAPI Reference Plugin via unescaped JSON.stringify
Attackers can execute arbitrary JavaScript in users' browsers by injecting malicious code into OpenAPI specification fields viewed in the documentation.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2026-33331?
CVE-2026-33331 is a high-severity cross-site scripting vulnerability in middleapi orpc, published on 24 Mar 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
oRPC is an tool that helps build APIs that are end-to-end type-safe and adhere to OpenAPI standards. Prior to version 1.13.9, a stored cross-site scripting (XSS) vulnerability exists in the OpenAPI documentation generation of orpc. If an attacker can control any field within the OpenAPI specification (such as info.description), they can break out of the JSON context and execute arbitrary JavaScript when a user views the generated API documentation. This issue has been patched in version 1.13.9.
Weakness: CWE-79
Which versions are affected by CVE-2026-33331?
2 open source packages ship an affected version, including @orpc/openapi. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
@orpc/openapi npm | All versions | 1.13.9 |
@orpc/openapi npm | All versions | 1.13.9 |
Products include Orpc Orpc.
How do I fix CVE-2026-33331?
Upgrade @orpc/openapi to 1.13.9 or later.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2026-33331 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-33331 exists.
Public exploit code: 1 proofs of concept on GitHub.
Other vulnerabilities in middleapi orpc
Sources
Also known as GHSA-7f6v-3gx7-27q8.