CVE-2025-61685
Mastra Docs MCP Server `@mastra/mcp-docs-server` Leads to Information Exposure
Description
Mastra is a Typescript framework for building AI agents and assistants. Versions 0.13.8 through 0.13.20-alpha.0 are vulnerable to a Directory Traversal attack that results in the disclosure of directory listings. The code contains a security check to prevent path traversal for reading file contents, but this check is effectively bypassed by subsequent logic that attempts to find directory suggestions. An attacker can leverage this flaw to list the contents of arbitrary directories on the user's filesystem, including the user's home directory, exposing sensitive information about the file system's structure. This issue is fixed in version 0.13.20.
INFO
Published Date :
Oct. 3, 2025, 11:15 p.m.
Last Modified :
Oct. 19, 2026, 4:10 p.m.
Remotely Exploit :
Yes !
Source :
[email protected]
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | |||||
| CVSS 3.1 | MEDIUM | [email protected] |
Solution
- Update Mastra to version 0.13.20.
- Apply security patches for the framework.
Public PoC/Exploit Available at Github
CVE-2025-61685 has a 2 public
PoC/Exploit available at Github.
Go to the Public Exploits tab to see the list.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2025-61685.
| URL | Resource |
|---|---|
| https://github.com/mastra-ai/mastra/commit/7f2b528ba82db512d68832d2f8ad6cbc8bb46cd4 | |
| https://github.com/mastra-ai/mastra/security/advisories/GHSA-xh92-rqrq-227v |
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2025-61685 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2025-61685
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
None
Shell
The Project shares all information on MCP related CVE's published
mcp mcp-security mcp-cve
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2025-61685 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2025-61685 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Translated by [email protected]
Oct. 19, 2026
Action Type Old Value New Value Added Translation Title: mastra-ai, Description: Mastra es un framework de Typescript para construir agentes y asistentes de IA. Las versiones 0.13.8 hasta 0.13.20-alpha.0 son vulnerables a un ataque de salto de directorio que resulta en la divulgación de listados de directorios. El código contiene una verificación de seguridad para prevenir el salto de ruta para la lectura de contenidos de archivos, pero esta verificación es efectivamente eludida por lógica subsiguiente que intenta encontrar sugerencias de directorio. Un atacante puede aprovechar esta falla para listar los contenidos de directorios arbitrarios en el sistema de archivos del usuario, incluyendo el directorio de inicio del usuario, exponiendo información sensible sobre la estructura del sistema de archivos. Este problema está corregido en la versión 0.13.20. -
CVE Modified by [email protected]
Jun. 17, 2026
Action Type Old Value New Value Added Affected [{'vendor': 'mastra-ai', 'product': 'mastra', 'versions': [{'status': 'affected', 'version': '<= 0.13.8, < 0.13.20'}]}] -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Jun. 17, 2026
Action Type Old Value New Value Added SSVC {'id': 'CVE-2025-61685', 'role': 'CISA Coordinator', 'options': [{'exploitation': 'poc'}, {'automatable': 'no'}, {'technicalImpact': 'partial'}], 'version': '2.0.3', 'timestamp': '2025-10-06T15:51:52.343087Z'} -
New CVE Received by [email protected]
Oct. 03, 2025
Action Type Old Value New Value Added Description Mastra is a Typescript framework for building AI agents and assistants. Versions 0.13.8 through 0.13.20-alpha.0 are vulnerable to a Directory Traversal attack that results in the disclosure of directory listings. The code contains a security check to prevent path traversal for reading file contents, but this check is effectively bypassed by subsequent logic that attempts to find directory suggestions. An attacker can leverage this flaw to list the contents of arbitrary directories on the user's filesystem, including the user's home directory, exposing sensitive information about the file system's structure. This issue is fixed in version 0.13.20. Added CVSS V3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N Added CWE CWE-548 Added Reference https://github.com/mastra-ai/mastra/commit/7f2b528ba82db512d68832d2f8ad6cbc8bb46cd4 Added Reference https://github.com/mastra-ai/mastra/security/advisories/GHSA-xh92-rqrq-227v