/

CVE-2026-44654

Severity:

HIGH RISK

(8.1)

Improper Authorization (CWE-863) in LibreChat Cross-Agent File Deletion

CVE-2026-44654

Analyzed

Vulnerability type

Category:

Improper Authorization

CWE:

CWE-863

Impact:

Cross-Agent Data Integrity Violation and Denial of Service

Severity:

HIGH RISK

(8.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

LibreChat versions up to and including 0.8.3 allow a shared-agent editor to delete file records that are reused by the agent owner across multiple agents via the DELETE /api/files endpoint.

Because deletions are applied globally instead of being scoped to the shared agent, an editor can unintentionally or maliciously break the owner's private agents, which retain stale file_id references to now-missing files.

Affected context

This vulnerability appears in LibreChat deployments where:

  • Users can collaborate on "shared agents" and assign editor roles to other users.
  • Files can be uploaded once and reused across multiple agents by reference (file_id).
  • The /api/files deletion endpoint acts on a globally stored file record rather than a per-agent association.

In these conditions, a collaborator editing one shared agent can remove a file that is also used by unrelated private agents owned by the same user, even though the editor has no access to those private agents.

Exploit preconditions

  • Attack surface: Application HTTP API, specifically DELETE /api/files.
  • Required access: Valid authenticated account with editor-level access to at least one shared agent that references a target file.
  • Trigger point: Issuing a file deletion request for a file_id that is reused across multiple agents, including private agents owned by the file owner.
  • Why exploitation is possible: Authorization checks focus on the shared agent/editor relationship but do not scope the file deletion to that agent. The backend treats files as globally owned resources and physically deletes them rather than removing only the association between the file and the shared agent.

Why this happens

The underlying issue is an improper authorization design around shared resources.

Instead of enforcing access control at the level of each agent–file relationship, the system exposes a global file deletion operation (DELETE /api/files) to shared-agent editors.

This aligns with CWE-863: Incorrect Authorization, where the system correctly authenticates the caller but fails to verify whether they are authorized to perform a state-changing operation that impacts other, unrelated resources (the owner's private agents).

Conceptually, the data model conflates "ownership of the file object" with "permission to use the file in a specific agent," allowing a user who can modify one agent to perform destructive operations on a shared underlying resource.

Potential impact

  • A shared-agent editor may delete files that the owner also uses in private agents.
  • The owner's private agents can stop functioning correctly or return errors due to stale file_id references.
  • Silent breakage of workflows and automation that depend on affected agents and files.
  • Denial of service against specific agent configurations without needing direct access to those agents.
  • Loss of important user-uploaded content if no backups or versioning are available.

General mitigation guidance

Effective mitigation centers on scoping destructive actions to the correct authorization boundary and separating global resources from per-agent relationships:

  • Model file usage as per-agent associations (e.g., a link table), and treat deletion from an agent as removal of that association rather than deletion of the global file.
  • Enforce authorization checks that verify both: (1) the caller's rights on the agent, and (2) the limited scope of the action (only that agent's link to the file).
  • Introduce resource-level ownership semantics so only file owners—or appropriately privileged roles—can perform global destructive operations on shared files.
  • Apply the principle of least privilege to collaborator roles: editor access should not imply the ability to modify or destroy shared assets outside the specific agent.
  • Provide non-destructive operations where possible (e.g., "detach from agent" instead of "delete file"), and only expose hard deletion to narrowly scoped, highly trusted roles.

How teams detect issues like this

Teams can identify and monitor this class of issue by:

  • Reviewing access-control logic around shared resources to ensure checks consider both the resource owner and the scope of the operation (agent-level vs global).
  • Using static analysis or code search to find endpoints where destructive operations (DELETE, hard delete, purge) are authorized only by one dimension (e.g., "can edit agent") but operate on multi-tenant or shared objects (e.g., global files table).
  • Adding tests and policy checks that simulate collaborative scenarios, verifying that actions on a shared agent do not alter unrelated agents or resources.
  • Instrumenting audit logs to capture which user deleted or detached which file_id and which agents were affected, then alerting on patterns where a non-owner causes global resource deletion.
  • Incorporating automated review tools or policy-as-code frameworks to flag mismatches between intended privilege boundaries (documented roles) and implemented endpoint behavior.

Sources

SourceLink
github.comgithub.com/danny-avila/LibreChat/security/advisories/GHSA-f8jg-v856-mf6q

Frequently asked

questions

Yes, in the sense that any authenticated user with shared-agent editor access can trigger it over the network via the application API, without needing infrastructure-level access. It does, however, require collaboration context with the victim (shared agent access).

The attacker must be an authenticated user who has editor or equivalent modification rights on at least one shared agent that uses a file owned by the victim. They do not need access to, or visibility into, the victim's private agents that also use the same file.

The safest pattern is to treat deletion from a shared agent as an operation on the relationship between that agent and the file, not on the global file object itself. Global file deletion should be restricted to the file owner or a narrowly defined privileged role, and the system should perform explicit authorization checks that consider resource ownership and scope.

Preventing similar problems requires designing access control around clear resource boundaries: model shared resources separately from their per-context associations, document privilege boundaries for each role, enforce authorization at the correct granularity in code, and add tests that validate that actions in one collaborative context cannot corrupt or delete resources used in another.

Find out what's already
exploitable in your codebase.