/

CVE-2026-119337

Severity:

HIGH RISK

(7.1)

Missing Authorization (CWE-862) in RAGFlow Agents API

CVE-2026-119337

Deferred

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-862

Impact:

Unauthorized access to private agent workflows and data

Severity:

HIGH RISK

(7.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

RAGFlow's agent completion endpoint may execute a private agent workflow before verifying that the authenticated caller is authorized to access it. An authenticated user who knows another user's private agent UUID could read the workflow's output across user or tenant boundaries, and configured tools may perform side effects.

RAGFlow's agent completion endpoint may execute a private agent workflow before verifying that the authenticated caller is authorized to access it. An authenticated user who knows another user's private agent UUID could read the workflow's output across user or tenant boundaries, and configured tools may perform side effects.

Affected context

The issue affects RAGFlow deployments in the affected release range when requests are handled through the agents chat completions endpoint and target an agent marked as private. The authorization check occurs after the completion processing path has already invoked the requested agent, creating a risk when an authenticated user can obtain or guess another user's agent UUID.

The issue affects RAGFlow deployments in the affected release range when requests are handled through the agents chat completions endpoint and target an agent marked as private. The authorization check occurs after the completion processing path has already invoked the requested agent, creating a risk when an authenticated user can obtain or guess another user's agent UUID.

Exploit preconditions

  • Attack surface: The authenticated agents chat completions API
  • Required access: A valid authenticated RAGFlow user account
  • Target knowledge: The UUID of another user's private agent
  • Trigger point: A request that invokes the OpenAI-compatible completion path for the targeted agent
  • Why exploitation is possible: Agent execution and output handling occur before the access-control check confirms that the caller may access the agent
  • Attack surface: The authenticated agents chat completions API
  • Required access: A valid authenticated RAGFlow user account
  • Target knowledge: The UUID of another user's private agent
  • Trigger point: A request that invokes the OpenAI-compatible completion path for the targeted agent
  • Why exploitation is possible: Agent execution and output handling occur before the access-control check confirms that the caller may access the agent

Why this happens

The underlying flaw is an authorization-ordering error. The endpoint invokes the requested agent through the completion path and can return its result before UserCanvasService.accessible() verifies ownership or tenant access. This behavior maps to CWE-862: Missing Authorization, because a protected resource is processed without enforcing the required permission check before use.

The underlying flaw is an authorization-ordering error. The endpoint invokes the requested agent through the completion path and can return its result before UserCanvasService.accessible() verifies ownership or tenant access. This behavior maps to CWE-862: Missing Authorization, because a protected resource is processed without enforcing the required permission check before use.

Potential impact

  • An attacker may read output from another user's private agent
  • Sensitive prompts, retrieved content, or generated responses could be disclosed
  • Cross-user or cross-tenant data boundaries could be bypassed
  • Configured agent tools could perform unintended side effects
  • The affected tenant or application workflow could be exposed to unauthorized actions
  • An attacker may read output from another user's private agent
  • Sensitive prompts, retrieved content, or generated responses could be disclosed
  • Cross-user or cross-tenant data boundaries could be bypassed
  • Configured agent tools could perform unintended side effects
  • The affected tenant or application workflow could be exposed to unauthorized actions

General mitigation guidance

Mitigation should prioritize authorization before any agent lookup, execution, tool invocation, or response generation.

Common defensive patterns include:

  • Enforcing ownership and tenant authorization before dispatching agent workflows
  • Applying deny-by-default access checks to private agents
  • Revalidating authorization at the service layer rather than relying only on route logic
  • Binding agent identifiers to the authenticated user and tenant context
  • Limiting tool permissions and executing tools with least privilege
  • Avoiding disclosure of workflow output when authorization fails
  • Using consistent authorization middleware and secure-by-default endpoint policies

Mitigation should prioritize authorization before any agent lookup, execution, tool invocation, or response generation.

Common defensive patterns include:

  • Enforcing ownership and tenant authorization before dispatching agent workflows
  • Applying deny-by-default access checks to private agents
  • Revalidating authorization at the service layer rather than relying only on route logic
  • Binding agent identifiers to the authenticated user and tenant context
  • Limiting tool permissions and executing tools with least privilege
  • Avoiding disclosure of workflow output when authorization fails
  • Using consistent authorization middleware and secure-by-default endpoint policies

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis and code review checks ensuring authorization precedes business-logic execution
  • Tests that request private resources using identities from different users and tenants
  • Review signals involving direct object identifiers, especially UUID-based resource access
  • API policy enforcement requiring ownership or tenant checks before downstream service calls
  • Runtime monitoring for cross-tenant access attempts and authorization failures following agent execution
  • Automated security testing that verifies denied requests do not invoke tools or return generated output

Organizations can look for this class of issue through:

  • Static analysis and code review checks ensuring authorization precedes business-logic execution
  • Tests that request private resources using identities from different users and tenants
  • Review signals involving direct object identifiers, especially UUID-based resource access
  • API policy enforcement requiring ownership or tenant checks before downstream service calls
  • Runtime monitoring for cross-tenant access attempts and authorization failures following agent execution
  • Automated security testing that verifies denied requests do not invoke tools or return generated output

Sources

SourceLink
github.comgithub.com/infiniflow/ragflow/commit/20180790e1a8c55553a2f3e75718f3d65178ae6d
github.comgithub.com/infiniflow/ragflow/pull/19817
github.comgithub.com/infiniflow/ragflow/releases/tag/v0.27.3
github.comgithub.com/infiniflow/ragflow/security/advisories/GHSA-c6q8-23rp-32cv

Frequently asked

questions

Yes, within the application's authenticated API surface. Exploitation requires sending a request to the agents completion endpoint and identifying a private agent UUID.

Yes. The described attack requires an authenticated RAGFlow user, but the account may not have legitimate access to the targeted agent.

Perform and enforce ownership and tenant authorization before invoking an agent, accessing its data, calling configured tools, or generating a response.

Use centralized, deny-by-default authorization checks, test cross-user and cross-tenant access paths, and verify that rejected requests produce no workflow execution or side effects.

Yes, within the application's authenticated API surface. Exploitation requires sending a request to the agents completion endpoint and identifying a private agent UUID.

Yes. The described attack requires an authenticated RAGFlow user, but the account may not have legitimate access to the targeted agent.

Perform and enforce ownership and tenant authorization before invoking an agent, accessing its data, calling configured tools, or generating a response.

Use centralized, deny-by-default authorization checks, test cross-user and cross-tenant access paths, and verify that rejected requests produce no workflow execution or side effects.

Find out what's already
exploitable in your codebase.