---
id: "CVE-2026-129158"
page: "https://infrastack.ai/live/CVE-2026-129158"
kind: "vulnerability"
aliases: ["CVE-2026-129158"]
title: "ragent: stored XSS via SVG knowledge-base uploads enables account takeover"
severity: "medium"
cvss: 5.4
epss: null
exploited: false
status: "open"
category: "ai-tooling"
products: [{"name": "ragent", "fixed": [], "affected": "1.1.0", "ecosystem": "github"}]
ecosystems: []
tags: ["ai-tooling", "knowledge-base", "ragent", "self-hosted", "xss"]
not_affected_if: ["no-svg-uploads", "separate-file-origin"]
published_at: "2026-11-13T18:17:40+00:00"
first_seen_at: "2026-11-13T18:49:30+00:00"
updated_at: "2026-11-13T18:52:43+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-129158", "first_seen_at": "2026-11-13T18:49:30+00:00"}, {"source": "analyst", "url": "https://github.com/nageoffer/ragent/issues/187", "first_seen_at": "2026-11-13T18:52:43+00:00", "cites": ["https://github.com/nageoffer/ragent/issues/187", "https://vul.yulun.ac.cn/20261104/ragent/"]}]
exploit_sources: [{"type": "poc", "url": "https://vul.yulun.ac.cn/20261104/ragent/"}]
---

# ragent: stored XSS via SVG knowledge-base uploads enables account takeover

Link for people: https://infrastack.ai/live/CVE-2026-129158 (this .md is for agents)

ragent 1.1.0 serves uploaded SVG knowledge-base files inline as image/svg+xml, so scripts run in the app origin. Any logged-in user who uploads a crafted SVG can steal the session cookie of a victim who opens it (the reporter demonstrated admin takeover). The upstream issue is open and no fix is published.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- github:ragent affected 1.1.0 fixed no fixed version listed

## How to check

- Check whether you run ragent 1.1.0 (nageoffer/ragent; reporter tested commit c3b6157730).
- Check whether GET /knowledge-base/docs/{docId}/file returns SVG with Content-Type image/svg+xml and Content-Disposition inline.
- Check whether any non-admin user can POST to /knowledge-base/{kb-id}/docs/upload with .svg files.
- Reporter says the login cookie 'Authorization' has no HttpOnly flag, so script can read it.

## Timeline

- 2026-11-13T18:49:30+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-129158
- 2026-11-13T18:52:43+00:00 analyst https://github.com/nageoffer/ragent/issues/187 — Maintainer issue nageoffer/ragent#187 (opened 2026-11-04) still open, no fixed version found; researcher report has PoC (admin cookie theft, Authorization cookie lacks HttpOnly). Not marked verified: no vendor statement on fix.

## Documents

- [advisory] Third-party advisory: www.vulncheck.com https://www.vulncheck.com/advisories/ragent-1.1.0-stored-xss-via-svg-knowledge-base-document-upload
- [advisory] ragent issue #187: SVG stored XSS (open) https://github.com/nageoffer/ragent/issues/187
- [poc] Ragent Vulnerability Report (Wu Yulun) https://vul.yulun.ac.cn/20261104/ragent/

## From the sources

ragent 1.1.0 contains a stored cross-site scripting vulnerability that allows authenticated users to inject scripts by uploading SVG knowledge-base documents served inline as image/svg+xml. Attackers can upload a script-bearing SVG via /knowledge-base/{kb-id}/docs/upload so that victims opening /knowledge-base/docs/{docId}/file execute it in the application origin, enabling account takeover.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
