CVE-2025-61685 Details
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.
A directory traversal vulnerability has been identified in the Mastra framework's documentation server package, `@mastra/mcp-docs-server`, affecting versions 0.13.8 through 0.13.20-alpha.0. This vulnerability allows attackers to bypass security checks and access arbitrary directory listings from the user's filesystem, including sensitive areas like the home directory. The issue arises because the initial security validation is undermined by subsequent logic that fails to properly sanitize paths before use.
Users are advised to update to version 0.17.0 or later, where this vulnerability has been fixed.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Oct 3, 2025CISA-ADP
Assessed Oct 6, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/mastra-ai/mastra/commit/7f2b528ba82db512d68832d2f8ad6cbc8bb46cd4 | [email protected] | Source CodeVendor |
| https://github.com/mastra-ai/mastra/security/advisories/GHSA-xh92-rqrq-227v | [email protected] | AdvisoryExploitRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-548 | Exposure of Information Through Directory Listing | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| Mastra | All versions |
CPE
Remediation
| |
| @mastra/mcp-docs-server | All versions |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Oct 3, 2025 | New CVE Received | [email protected] |
Volerion