Security

RAGFlow: any signed-in user can read other tenants' documents

RAGFlow - missing tenant authorization on document read endpoints allows cross-tenant document and object-store reads (GHSA-qwq5-rhrp-qqj7)

PUBLISHED SEVERITY HIGHSTATUS PatchedGHSA-qwq5-rhrp-qqj7
Patched

Fixed by three PRs: #19348 (document preview, released in 0.27.2), #19818 (document images, released in 0.27.3) and #20649 (document details, released in 1.0.0). 0.27.3 does not ship the Go API server, so it carries every fix that applies to it; 1.0.0 carries all three. Track the fix at infiniflow/ragflow#19348.

Product
RAGFlow (API server, Go and Python) in infiniflow/ragflow
Affected versions
RAGFlow before 0.27.3, and 1.0.0 pre-releases before 1.0.0-rc2. Fixed in 0.27.3 (2026-10-23) and 1.0.0 (2026-11-06).
Severity
HIGH
Status
Patched
Weaknesses
  • CWE-639Authorization Bypass Through User-Controlled Key
  • CWE-862Missing Authorization
As filed on the advisory.
GitHub advisory
GHSA-qwq5-rhrp-qqj7
Private; in triage, not yet published by the maintainer
CVE
Pending (requested via MITRE CNA-LR)
Published
Credit
Finder: Aaron Elijah Mars of Aeon. Tool: Aeon (https://www.aeon.fun).

What users should do now

  1. Update RAGFlow to 1.0.0 or later. On the 0.27 line, 0.27.3 is the first fixed release.
  2. If you ran an older version with sign-up open to the public, assume any user could have read documents of other teams whose IDs they had seen. Review API access logs for /documents/<id>/preview, /documents/images/<id> and /documents/<id> requests from users outside the owning team.
  3. Until you update, turn off public sign-up, revoke API and beta SDK tokens you do not need, and remove users who should no longer see a dataset (their old document links kept working before the fix).

Summary

RAGFlow keeps each team's (tenant's) documents in knowledge bases and stores the files in an object store. Three read endpoints took an ID from the URL and returned data for it after checking only that the caller was signed in. They never checked that the document belonged to a knowledge base the caller can see. The Python version of the preview endpoint did make this check, and its docstring names this exact threat; the Go port of the same endpoint left it out. The image endpoint went further: it split its ID into an object-store bucket and key and read whatever they named, in both the Go and Python servers.

Affected versions

  • Document preview (GET /api/v1/documents/{id}/preview, Go server): RAGFlow before 0.27.2. Fixed by #19348.
  • Document image (GET /api/v1/documents/images/{image_id}, Go and Python servers): RAGFlow before 0.27.3. Fixed by #19818.
  • Document details (GET /api/v1/documents/{id}, Go server): RAGFlow 0.27.2 and earlier, and 1.0.0-rc1. Fixed by #20649 in 1.0.0-rc2 and 1.0.0. 0.27.3 does not ship the Go API server.

Impact

  • Cross-tenant file reads. A signed-in user of one team could download the full original file of any document in another team, given its document ID. Sign-up is open by default, so getting a valid account takes no help from anyone.
  • Object-store reads. The image endpoint read any object in the configured store whose bucket and key it was given, not just images. Document files are stored under their knowledge base ID and file name, so it could return documents too.
  • Details that make the rest easier. The details endpoint returned any document's metadata, including its knowledge base ID and storage location, which is exactly what the image endpoint needs.
  • No revocation. A user removed from a team, or from a dataset, kept read access to every document ID they had already seen.

IDs are 32-character random values, so this is not blind mass scraping. But IDs are not secrets: they show up in web app URLs, API responses, chat citations, shared conversations, browser history and logs, and every past team member has seen them. The report rated this High. A working exploit is withheld.

Affected code

Permalinks at 554fb11, the main commit the report was checked against.

Fix

  • #19348 (merged 2026-09-10) adds a tenant access check to document preview before any file is read. Released in 0.27.2.
  • #19818 (merged 2026-09-20) makes the image endpoint, in both the Go and Python servers, first find the document that owns the image and check the caller can read it, and answers "not found" otherwise. It also adds a document-scoped image route. Released in 0.27.3 and 1.0.0.
  • #20649 (merged 2026-10-09) adds the same dataset access check to the document details and metadata summary endpoints. Released in 1.0.0.
  • Checked again at main (bb7b3c2) on 2026-11-25: all three endpoints run a document access check before reading data.

Timeline

  1. Reported privately via GitHub PVR (GHSA-qwq5-rhrp-qqj7), with a suggested fix.
  2. Maintainers merge #19348 (preview); released the same day in 0.27.2.
  3. We follow up on the advisory: preview fixed, image endpoint still open.
  4. Maintainers merge #19818 (images).
  5. Maintainers merge #20649 (details). We ask the maintainer to publish the advisory and request a CVE; we note a fallback CVE ID reserved with MITRE.
  6. RAGFlow 0.27.3 released.
  7. We ask again for the advisory to be published.
  8. RAGFlow 1.0.0 released with all three fixes.
  9. We tell the maintainer this write-up will go public on 2026-11-25 and invite changes; no reply.
  10. Public write-up; MITRE asked to publish the CVE.

Credit

Finder: Aaron Elijah Mars of Aeon. Tool: Aeon.

References