CVE-2026-82273 Overview
CVE-2026-82273 is an authentication bypass vulnerability in Mastra, an open-source AI agent framework, affecting versions through 1.63.0. The flaw exists in the memory API thread ownership validation logic. When the mapUserToResourceId callback is omitted from configuration, the ownership check becomes a no-op. Authenticated attackers can issue GET /api/memory/threads requests to enumerate all threads across resource owners. This exposes conversation history and metadata belonging to other users of the same Mastra deployment. The issue is tracked under CWE-862: Missing Authorization.
Critical Impact
Any authenticated user can read conversation history and metadata belonging to other resource owners on Mastra deployments where mapUserToResourceId is unset.
Affected Products
- Mastra AI agent framework versions through 1.63.0
- Deployments where the mapUserToResourceId callback is not configured
- The /api/memory/threads endpoint in packages/server/src/server/handlers/utils.ts
Discovery Timeline
- 2026-08-28 - CVE-2026-82273 published to NVD
- 2026-08-28 - Last updated in NVD database
Technical Details for CVE-2026-82273
Vulnerability Analysis
Mastra exposes a memory API that stores conversation threads associated with a resourceId. The framework relies on a caller-supplied mapUserToResourceId callback to bind the authenticated principal to the resource that owns a thread. When integrators omit this callback, the server-side ownership validation short-circuits and returns success without comparing the caller identity against the thread owner.
The result is a broken authorization boundary at the API layer. The endpoint GET /api/memory/threads returns thread records for arbitrary resourceId values supplied in the request. Any user with valid authentication to the Mastra instance can iterate resource identifiers and retrieve threads that belong to other tenants or accounts. See the VulnCheck advisory for the underlying analysis.
Root Cause
The defect resides in the request-handling utilities at packages/server/src/server/handlers/utils.ts. The ownership check treats an unset mapUserToResourceId as an implicit allow rather than a deny. This is a classic missing-authorization pattern [CWE-862] where an optional configuration hook is required for the security control to function. See Mastra issue #18911 and the affected utils source.
Attack Vector
An authenticated attacker sends GET /api/memory/threads requests with resource identifiers belonging to other users. Because the ownership check is bypassed, the server returns thread metadata and conversation history for those identifiers. Exploitation requires only low-privilege authenticated access and no user interaction. Resource identifiers may be discovered through enumeration, log exposure, or predictable identifier schemes used by the integrating application.
No verified exploit code is publicly available. Refer to the Mastra project repository for source-level details.
Detection Methods for CVE-2026-82273
Indicators of Compromise
- Repeated GET /api/memory/threads requests from a single session iterating distinct resourceId values.
- HTTP 200 responses returning thread payloads for resourceId values not associated with the authenticated principal.
- Access log entries showing a single account retrieving threads across many resource owners in a short window.
Detection Strategies
- Correlate authenticated user identity with resourceId values returned by /api/memory/threads and alert on mismatches.
- Baseline per-user thread access volume and flag deviations consistent with enumeration behavior.
- Inspect Mastra deployment configuration for a missing mapUserToResourceId callback and treat that state as a vulnerable indicator.
Monitoring Recommendations
- Forward Mastra application logs and reverse-proxy access logs to a central SIEM for correlation.
- Monitor for high-cardinality resourceId access patterns from single sessions or tokens.
- Track configuration drift for the mapUserToResourceId binding across environments.
How to Mitigate CVE-2026-82273
Immediate Actions Required
- Configure a mapUserToResourceId callback that maps the authenticated principal to the correct resource identifier for every request.
- Audit the Mastra deployment configuration to confirm the callback is present in all environments including staging and preview.
- Review access logs for /api/memory/threads for signs of cross-tenant enumeration prior to remediation.
- Rotate or invalidate exposed conversation data where sensitive content may have been read.
Patch Information
See Mastra issue #18911 and the Mastra project repository for upstream fix status. Upgrade beyond version 1.63.0 when a fixed release is available and validate that the ownership check enforces authorization regardless of whether mapUserToResourceId is configured.
Workarounds
- Set mapUserToResourceId in configuration so the ownership check evaluates identity against the requested resourceId.
- Place the memory API behind an authorization proxy that validates the caller's right to the requested resourceId before forwarding.
- Restrict network exposure of /api/memory/threads to trusted service accounts until the callback is configured or the upstream fix is applied.
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.