CVE-2025-61685

Medium

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.

SeverityMedium
CVSS6.5
Exploit probability—
Product@mastra/mcp-docs-server
PublishedOct 3, 2025
First seenOct 3, 2025
Weakness typeCWE-548CWE-548

How to fix

Update
  • @mastra/mcp-docs-server0.17.0 or later

Affected products

ProductAffected versionsFixed in
@mastra/mcp-docs-servernpmv < 0.17.00.17.0

Check your version

Choose the product and enter the version you run to see whether it falls in the affected range.

In the Intelligence 360 plan

Attack Surface Management

See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.

CVE-2025-61685 · @mastra/mcp-docs-server · Dark Radar