Mastra Docs MCP Server `@mastra/mcp-docs-server` Leads to Information Exposure
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- High · None · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| mastra-ai | mastra | <= 0.13.8, < 0.13.20 | — | No fix listed | CNA |
| — | @mastra/mcp-docs-server (npm) | before 0.17.0 | 0.17.0 | Patch available | GHSA-xh92-rqrq-227v |
- mastra Vendormastra-ai Affected <= 0.13.8, < 0.13.20 Fixed in — No fix listed CNA
- @mastra/mcp-docs-server (npm) Vendor— Affected before 0.17.0 Fixed in 0.17.0 Patch available GHSA-xh92-rqrq-227v
Remediation
- Fix · GHSA-xh92-rqrq-227v @mastra/mcp-docs-server (npm) Fixed in 0.17.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2025-61685
- 2026-10-03 Alias added: GHSA-xh92-rqrq-227v
References
More mastra-ai vulnerabilities
- TI-2026-56738 Mastra Memory API Thread Ownership Check Is a No-op When mapUserToResourceId Is Unset CVSS 4.0HIGH 7.1
Sources
- CVE-2025-61685 · CVE Program
- CVE-2025-61685 · NVD
- FIRST EPSS
- GHSA-xh92-rqrq-227v · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences