CVE-2026-25802: Github.com/QuantumNous/new api Cross-Site Scripting Vulnerability
HIGHCVE-2026-25802 is a HIGH (CVSS 7.6) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Github.com/QuantumNous/new api libraries in the Go ecosystem. The issue involves new api has potential xss in its markdownrenderer component. Remediation is available by upgrading affected packages to version 0.10.8-alpha.9.
CVE-2026-25802 at a Glance
Security Impact
CVSS: 7.6
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:H/A:L).
How to Fix CVE-2026-25802
To remediate this vulnerability, upgrade all affected Github.com/QuantumNous/new api dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/QuantumNous/new-api to 0.10.8-alpha.9
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/QuantumNous/new-api
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-25802, inspect your project dependencies for Github.com/QuantumNous/new api:
inspect dependencies for github.com/QuantumNous/new-api
Analyze the terminal output to locate any version of Github.com/QuantumNous/new api in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.10.8-alpha.9), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Github.com/QuantumNous/new api, 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
CVE-2026-25802 Affected Github.com/QuantumNous/new api Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/QuantumNous/new-api
|
Go |
< 0.10.8-alpha.9
|
0.10.8-alpha.9
|
References
Frequently Asked Questions
What is CVE-2026-25802?
Which Github.com/QuantumNous/new api versions are affected?
What version fixes CVE-2026-25802?
Is github.com/QuantumNous/new-api affected?
What is the CVSS score of CVE-2026-25802?
What CWE is associated with CVE-2026-25802?
How can I check Go dependencies for CVE-2026-25802?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-299v-8pq9-5gjq",
"modified" : "2026-02-27T21:41:05Z",
"published" : "2026-02-23T22:10:25Z",
"aliases" : [ "CVE-2026-25802" ],
"summary" : "New API has Potential XSS in its MarkdownRenderer component",
"details" : "### Summary\n\nA potential unsafe operation occurs in component `MarkdownRenderer.jsx`, allowing for Cross-Site Scripting(XSS) when the model outputs items containing `<script>` tag.\n\n### Details\n\nLine 212-231 of `MarkdownRenderer.jsx` is unsafe, it use dangerouslySetInnerHTML to preview html the model generates. This can trigger malcious scripts.\n\n### PoC\n\nA simple way to exploit that is to ask the model in the playground, with prompt: \"请帮我写个脚本,跳转到google\", and then the browser will navigate to the google.com without user interference.\n\n### Impact\n\nPotential malcious activity to the user using playground, if the model api is altered to output unintended codes.\n\nAlso, users may not be easily rid the exploit, since the record of the chat containing XSS script is stored, once opening the page later, the script will be re-triggered.\n\n### Potential Workaround\n\nThe preview may be placed in an iframe sandbox, dangerous html strings should be purified before rendering.\n\n---\n\nThe reply generated for test is as below:\n\n这是一个为您编写的单页 HTML 文件。它使用了两种方式来实现跳转,以确保在任何情况下都能工作:\n\n1. **JavaScript (`window.location.replace`)**:这是最常用且高效的方法,它会立即跳转,并且不会保留当前页面在浏览器历史记录中(这样用户按“后退”键不会回到这个跳转页)。\n2. **HTML Meta Refresh**:作为后备方案。如果用户的浏览器禁用了 JavaScript,这个标签会在 1 秒后将用户带往 Google。\n3. **手动链接**:页面中显示了一个备用链接,以防自动跳转被拦截或失效。\n\n您可以直接保存以下代码为 `.html` 文件并在浏览器中打开。\n\n```html\n<!DOCTYPE html>\n<html lang=\"zh-CN\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>正在跳转至 Google...</title>\n \n <!-- 方法1:HTML Meta Refresh (如果JS被禁用,1秒后自动跳转) -->\n <meta http-equiv=\"refresh\" content=\"1;url=https://www.google.com\">\n\n <style>\n /* 基础重置与布局 */\n body, html {\n height: 100%;\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;\n background-color: #f8f9fa;\n color: #202124;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n /* 卡片容器样式 */\n .redirect-card {\n background: white;\n padding: 2rem 3rem;\n border-radius: 12px;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);\n text-align: center;\n max-width: 400px;\n width: 90%;\n }\n\n /* 加载动画圆圈 */\n .spinner {\n border: 4px solid #f3f3f3;\n border-top: 4px solid #4285f4; /* Google Blue */\n border-radius: 50%;\n width: 40px;\n height: 40px;\n animation: spin 1s linear infinite;\n margin: 0 auto 1.5rem auto;\n }\n\n /* 文本排版 */\n h1 {\n font-size: 1.25rem;\n margin-bottom: 0.5rem;\n font-weight: 500;\n }\n\n p {\n font-size: 0.95rem;\n color: #5f6368;\n margin-bottom: 1.5rem;\n line-height: 1.5;\n }\n\n /* 手动链接样式 */\n .manual-link {\n display: inline-block;\n color: #1a73e8; /* Google Link Blue */\n text-decoration: none;\n font-weight: 500;\n padding: 0.5rem 1rem;\n border: 1px solid #dadce0;\n border-radius: 4px;\n transition: background-color 0.2s;\n }\n\n .manual-link:hover {\n background-color: #f1f3f4;\n text-decoration: underline;\n }\n\n /* 动画定义 */\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n </style>\n</head>\n<body>\n\n <main class=\"redirect-card\">\n <!-- 视觉反馈:加载动画 -->\n <div class=\"spinner\"></div>\n \n <!-- 提示信息 -->\n <h1>正在为您跳转</h1>\n <p>我们正在将您引导至 Google。<br>如果页面没有自动刷新,请点击下方的按钮。</p>\n \n <!-- 手动跳转链接 -->\n <a href=\"https://www.google.com\" class=\"manual-link\">立即前往 Google</a>\n </main>\n\n <script>\n // 方法2:JavaScript 跳转 (推荐)\n // 使用 replace() 而不是 href,这样用户点击“后退”时不会死循环回到这个跳转页\n (function() {\n // 目标地址\n var targetUrl = \"https://www.google.com\";\n\n // 执行跳转\n window.location.replace(targetUrl);\n \n // 控制台日志(用于调试)\n console.log(\"Redirecting to: \" + targetUrl);\n })();\n </script>\n\n</body>\n</html>\n```\n\n### Acknowledgments\n\nQuantumNous would like to thank **TechnologyStar** for the early notification of this potential vulnerability via AI-assisted tools, and **small-lovely-cat** for providing additional context and an initial patch. The final fix was developed and verified by the maintainers to ensure full compatibility with the project's architecture.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:N/I:H/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/QuantumNous/new-api"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.10.8-alpha.9"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/QuantumNous/new-api/security/advisories/GHSA-299v-8pq9-5gjq"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-25802"
}, {
"type" : "WEB",
"url" : "https://github.com/QuantumNous/new-api/commit/ab5456eb1049aa8a0f3e51f359907ec7fff38b4b"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/QuantumNous/new-api"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2026-4532"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-02-23T22:10:25Z",
"nvd_published_at" : "2026-02-24T01:16:14Z"
}
}