CVE-2026-25802
📋 TL;DR
This vulnerability allows attackers to inject malicious scripts via model outputs containing <script> tags in New API's MarkdownRenderer.jsx component, leading to Cross-Site Scripting (XSS). It affects all users of New API versions before 0.10.8-alpha.9. The XSS could execute arbitrary JavaScript in victims' browsers.
💻 Affected Systems
- New API (LLM gateway and AI asset management system)
📦 What is this software?
New Api by Newapi
New Api by Newapi
New Api by Newapi
New Api by Newapi
New Api by Newapi
New Api by Newapi
New Api by Newapi
New Api by Newapi
New Api by Newapi
⚠️ Risk & Real-World Impact
Worst Case
Attackers could steal session cookies, perform actions as authenticated users, redirect to malicious sites, or install malware on client systems.
Likely Case
Session hijacking, credential theft, or defacement of the AI management interface through client-side script execution.
If Mitigated
Limited to client-side disruption if proper Content Security Policy (CSP) headers are implemented and input validation is enforced.
🎯 Exploit Status
XSS vulnerabilities typically have low exploitation complexity, especially when unauthenticated access is possible.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 0.10.8-alpha.9
Vendor Advisory: https://github.com/QuantumNous/new-api/security/advisories/GHSA-299v-8pq9-5gjq
Restart Required: Yes
Instructions:
1. Backup current configuration. 2. Update to version 0.10.8-alpha.9 via package manager or manual installation. 3. Restart the New API service. 4. Verify the fix by checking the version.
🔧 Temporary Workarounds
Implement Content Security Policy
allAdd strict CSP headers to prevent script execution from untrusted sources.
Add 'Content-Security-Policy: script-src 'self'' to HTTP headers
Input Sanitization
allSanitize all model outputs before rendering in MarkdownRenderer.jsx.
Implement DOMPurify or similar library to sanitize HTML content
🧯 If You Can't Patch
- Implement network segmentation to isolate vulnerable systems from critical assets.
- Deploy a Web Application Firewall (WAF) with XSS protection rules enabled.
🔍 How to Verify
Check if Vulnerable:
Check if current version is below 0.10.8-alpha.9 and test for XSS by attempting to inject <script>alert('XSS')</script> via model outputs.
Check Version:
npm list new-api | grep new-api (or check package.json for version)
Verify Fix Applied:
After patching, test that <script> tags in model outputs are properly sanitized and do not execute.
📡 Detection & Monitoring
Log Indicators:
- Unusual model output patterns containing script tags
- Multiple failed XSS attempts in access logs
Network Indicators:
- HTTP requests with script tags in payloads
- Unexpected JavaScript execution in client traffic
SIEM Query:
source="web_logs" AND ("<script>" OR "javascript:") AND status=200