GHSA-7f6v-3gx7-27q8
GHSA-cqr2-w8jq-c675
GHSA-w5g8-5849-vj76
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessInject malicious JavaScript in OpenAPI spec field
-
ExploitEmbed payload via JSON.stringify in HTML template
-
ExecutionBreak JSON context with script tag
-
ImpactExecute arbitrary JavaScript in victim browser
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Attacker must control an OpenAPI specification field (e.g., info.description, title, or similar) exposed through orpc's OpenAPI documentation generation. Victim must view the generated API documentation page in a web browser. No authentication required; vulnerable to remote unauthenticated attackers if the OpenAPI spec is publicly accessible or modifiable. |
| Impact | The CVSS 3.1 vector AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N yields a score of 8.2, indicating network-accessible exploitation with low complexity, no privileges required, but user interaction needed. The changed scope and high confidentiality impact reflect that successful exploitation could compromise administrator or developer sessions viewing documentation. The attack requires either user-controlled OpenAPI specification inputs or a malicious insider with specification editing access, combined with a victim viewing the generated documentation. While no EPSS score or KEV listing is provided in the intelligence, the existence of a detailed proof-of-concept significantly lowers the exploitation barrier. Real-world risk is moderate-to-high for organizations that dynamically generate OpenAPI specifications from user inputs or lack strict controls over specification authoring, as documentation viewers typically include privileged users (developers, administrators) making this an attractive privilege escalation vector. The technical impact is high (arbitrary JavaScript execution in victim context), but exploitation is not automatable and requires social engineering or specific application configurations. |
| Exploit ScenarioDerived | An attacker with the ability to modify OpenAPI specifications (either through user-controlled inputs in dynamically generated specs or as a malicious insider) injects a payload such as '</script><script>alert(document.cookie)</script>' into the info.description field. When an administrator or developer navigates to the API documentation URL to review the API, the browser parses the malicious payload, breaks out of the JSON script block, and executes the attacker's JavaScript, potentially stealing session cookies or performing actions with the victim's privileges. The provided proof-of-concept demonstrates this exact attack chain, making exploitation straightforward for attackers who can influence specification content. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Mar 20, 2026
A Stored Cross-Site Scripting (XSS) vulnerability exists in the orpc OpenAPI documentation generation functionality, affecting the @orpc/openapi npm package. Attackers who can control OpenAPI specification fields (such as info.description) can inject malicious JavaScript that executes when users view the generated API documentation. A working proof-of-concept exists demonstrating payload injection through specification metadata fields, and while CVSS scores this at 8.2 (High), the network-accessible attack vector with no privileges required increases real-world risk.
RemediationAI
Replace the vulnerable JSON.stringify() implementation with a secure HTML serialization approach that properly escapes HTML-sensitive characters before embedding JSON into script tags. Developers should use established libraries such as serialize-javascript or devalue that handle context-appropriate escaping for embedding data in HTML. Alternatively, implement manual escaping of characters like '<', '>', and '&' within JSON strings before insertion into the HTML template. Consult the official GitHub Security Advisory at https://github.com/middleapi/orpc/security/advisories/GHSA-7f6v-3gx7-27q8 for patched versions and upgrade guidance. Until patching is possible, implement input validation and sanitization for all OpenAPI specification fields, restrict specification authoring permissions to trusted developers only, and consider serving API documentation on a separate domain to limit the impact of potential XSS through browser same-origin policy isolation.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 4 packages in npm, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
This vulnerability affects the @orpc/openapi npm package (pkg:npm/@orpc_openapi) and is classified under CWE-79 (Improper Neutralization of Input During Web Page Generation). The flaw exists in the renderDocsHtml() function within packages/openapi/src/plugins/openapi-reference.ts, where OpenAPI specification objects are embedded directly into HTML templates using JSON.stringify() within script tags. Because JSON.stringify() does not escape HTML-sensitive characters like angle brackets, an attacker can inject sequences such as '</script><script>' to break out of the intended application/json context and introduce executable JavaScript code. This is a classic context-switching XSS vulnerability where data transitions from JSON to HTML without proper sanitization at the boundary.
Know when Wordpress Plugin gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N
Primary rating from GitHub Advisory · only source for this CVE.
CVSS VectorGitHub Advisory
Lifecycle Timeline
2DescriptionGitHub Advisory
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. In the packages/openapi/src/plugins/openapi-reference.ts file, the renderDocsHtml() function takes an OpenAPI spec object and embeds it directly into the HTML response using a template literal:
<script id="spec" type="application/json">${JSON.stringify(spec)}</script>
The JSON.stringify() function does not escape HTML characters like < or >. Therefore, if an attacker provides a string containing </script><script>..., the browser will prematurely close the application/json script block and execute the subsequent malicious script block.
Proof of Concept (PoC)
- Create an API router with orpc and configure the OpenAPI plugin.
- In the API specification, inject a malicious payload into a field like description:
{
info: {
title: "My API",
version: "1.0.0",
description: "</script><script>alert('XSS executed on ' + document.domain)</script>"
}
}- Generate and serve the documentation HTML.
- When a developer or user navigates to the API documentation URL, the browser parses the HTML, breaks out of the JSON block, and immediately executes the alert() payload.
Impact
If an application generates its OpenAPI specifications dynamically based on user-controlled inputs (or if a rogue developer modifies the spec), it leads to Stored XSS. When an administrator or developer views the API docs, the script executes in their browser, potentially leading to session hijacking or unauthorized API calls on their behalf.
Remediation
Do not use raw JSON.stringify() to embed data directly into HTML templates. Instead, safely serialize the JSON by escaping HTML-sensitive characters (like < and >) or use a secure HTML serialization library (such as serialize-javascript or devalue) before embedding it into the <script> tag.
Disclosure & Credits
If this report is helpful, I kindly request that you publish this as a formal GitHub Security Advisory and assign me credit for the discovery. Thank you for maintaining this project!
Executive ViewAI
A stored cross-site scripting vulnerability in the @orpc/openapi package allows attackers to inject malicious code into API documentation that executes when developers or users view it. Organizations using this package face potential compromise of developer workstations, credential theft, and supply chain risk, with no patch currently available.
Implement Web Application Firewall (WAF) rules to block script execution in API documentation endpoints; restrict documentation access via network segmentation to internal/VPN-only; disable or isolate the @orpc/openapi functionality until patch availability; enforce strict Content Security Policy (CSP) headers preventing inline script execution; require code review of all OpenAPI specification uploads; consider temporary documentation hosting behind authentication with IP whitelisting.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
More in Wordpress Plugin
View allThe Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1
The Hash Form - Drag & Drop Form Builder plugin for WordPress is vulnerable to arbitrary file uploads due to missing fil
Authentication bypass in the LiteSpeed Cache WordPress plugin (versions prior to 6.5.0.1) allows unauthenticated remote
The Simple File List plugin for WordPress through version 4.2.2 contains an unauthenticated remote code execution vulner
The AI Engine WordPress plugin through version 3.1.3 exposes Bearer Token values through the /mcp/v1/ REST API endpoint
The SureTriggers WordPress plugin through version 1.0.82 contains a privilege escalation vulnerability that allows unaut
The Ninja Forms plugin before 2.9.42.1 for WordPress allows remote attackers to conduct PHP object injection attacks via
The Business Directory Plugin - Easy Listing Directories for WordPress plugin for WordPress is vulnerable to time-based
SQL injection in the NotificationX WordPress plugin (versions up to and including 2.8.2) allows unauthenticated remote a
The POST SMTP Mailer - Email log, Delivery Failure Notifications and Best Mail SMTP for WordPress plugin for WordPress i
The MasterStudy LMS WordPress Plugin - for Online Courses and Education plugin for WordPress is vulnerable to union base
The Email Subscribers by Icegram Express plugin for WordPress is vulnerable to SQL Injection via the ‘hash’ parameter in
EUVD-2026-14179
NVD
CVE.org
EPSS
VulDB
Exploit-DB