/

CVE-2026-61644

Severity:

HIGH RISK

(7.7)

Improper Auth Context (CWE-863) in FastGPT Dataset API

CVE-2026-61644

Deferred

Vulnerability type

Category:

Improper Authorization

CWE:

CWE-863

Impact:

Cross-tenant Data Exposure

Severity:

HIGH RISK

(7.7)

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

FastGPT's chat record quote endpoint performs authentication on chat and collection identifiers but fails to bind a key lookup to the same authorized context.

A low-privileged tenant user can supply a foreign dataset data ID and receive another tenant's quote or full-text content, exposing cross-tenant data whenever this endpoint is reachable.

Affected context

This vulnerability occurs in multi-tenant FastGPT deployments using versions 4.14.17 through 4.15.0-beta4 where the /api/core/chat/record/getCollectionQuote endpoint is exposed.

It manifests when the application validates ownership of parameters such as appId, chatId, chatItemDataId, and collectionId, but does not constrain the initialId lookup to the same tenant or dataset context.

In environments where tenants import proprietary or sensitive knowledge-base content, this missing binding can allow one tenant to retrieve content belonging to another tenant via the affected endpoint.

Exploit preconditions

  • Attack surface: HTTP POST requests to /api/core/chat/record/getCollectionQuote.
  • Required access: Valid low-privileged tenant account capable of invoking the endpoint with legitimate appId, chatId, chatItemDataId, and collectionId values.
  • Trigger point: Supplying an initialId that corresponds to a dataset data record owned by a different tenant while keeping other parameters attacker-owned and valid.
  • Why exploitation is possible: The server checks that some identifiers belong to the caller, but the initialId center-node lookup is not enforced against the authenticated tenant or authorized dataset context, enabling retrieval of foreign content.

Why this happens

The underlying bug is an authorization logic flaw where object-level access control is incompletely enforced.

The endpoint correctly validates a subset of resource identifiers (chat and collection context) but treats initialId as a trusted key without re-validating its tenancy or dataset association.

This maps to CWE-863: Incorrect Authorization, where a system authorizes a request based on partial context and fails to ensure that every referenced resource is within the caller's allowed scope.

Potential impact

  • Unauthorized retrieval of quotes from another tenant's datasets.
  • Exposure of full-text knowledge-base content belonging to other organizations.
  • Leakage of proprietary, confidential, or regulated information stored in FastGPT.
  • Potential correlation of cross-tenant data leading to broader privacy violations.

General mitigation guidance

Mitigation focuses on enforcing strict, context-aware authorization for every resource identifier processed by the endpoint.

Common defensive patterns include:

  • Binding all lookup keys (including initialId) to the authenticated tenant and verifying they belong to the authorized app, chat, collection, or dataset before use.
  • Implementing consistent object-level access control checks that treat every parameter referencing stored content as untrusted until validated.
  • Designing multi-tenant APIs so that tenant context is derived from authentication and not overridable via request parameters.
  • Applying least-privilege principles to data access, ensuring endpoints only expose content that is necessary for the caller's workflow.

How teams detect issues like this

Detection typically involves scrutinizing authorization logic at the resource level rather than just the endpoint level.

Helpful approaches include:

  • Static or manual code review to identify endpoints where some parameters are validated for ownership or tenancy while others are used directly in data lookups.
  • Authorization-focused tests that attempt cross-tenant access by mixing attacker-owned identifiers with foreign resource IDs to confirm isolation.
  • Centralized authorization policies or middleware that enforce tenant binding for all data access operations, backed by automated checks in CI pipelines.
  • Use of automated security testing tools capable of generating multi-parameter requests to detect insecure direct object references and incorrect authorization flows.

Sources

SourceLink
github.comgithub.com/labring/FastGPT/commit/0c1840c7773c5be5d777f86228651479e02155db
github.comgithub.com/labring/FastGPT/pull/7173
github.comgithub.com/labring/FastGPT/releases/tag/v4.15.0-beta5
github.comgithub.com/labring/FastGPT/security/advisories/GHSA-mmg6-2g54-j896

Frequently asked

questions

It is exploitable wherever the affected endpoint is accessible by tenant users on vulnerable versions, allowing them to craft requests mixing their own chat and collection IDs with foreign dataset data IDs.

No. A low-privileged tenant account is sufficient, as long as the user can call the endpoint and guess or obtain identifiers for another tenant's dataset records.

Apply strict object-level authorization that verifies every referenced resource—especially IDs like initialId—belongs to the authenticated tenant and is part of the authorized app, chat, or collection before returning any content.

Standardize authorization checks through reusable middleware or policy engines, design APIs to derive tenant context from authentication rather than request parameters, and incorporate access-control testing into development and CI to catch cross-tenant data leakage early.

Find out what's already
exploitable in your codebase.