CVE-2025-61685: mastra · Exposure of Information Through Directory Listing
Affects mastraSource CVE Database V5
Not known to be exploited · CVSS 6.5 Medium · fixed in 0.13.20 : update mastra when convenient.
Data as of 26 Oct 2026, 12:55 UTC
- EPSS
- 0.5% chance of exploitation in 30 days – higher than 48% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 0.13.20
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:NExploitation evidence
Disclosed: evidence found.
CVE published 3 Oct 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
AI-suggested
To mitigate CVE-2025-61685, European organizations should take the following specific actions: 1) Immediately upgrade all instances of the mastra framework to version 0.13.20 or later, where the vulnerability is fixed. 2) Conduct an inventory of all systems running vulnerable mastra versions to ensure comprehensive patching. 3) Restrict network access to services running mastra to trusted internal networks or VPNs to reduce exposure to remote attackers. 4) Implement strict access controls and least privilege principles for users and services interacting with mastra to limit the ability of attackers to exploit the vulnerability. 5) Monitor logs and network traffic for unusual directory listing requests or patterns indicative of reconnaissance attempts. 6) If upgrading is not immediately feasible, consider deploying web application firewalls (WAFs) or intrusion detection systems (IDS) with custom rules to detect and block directory traversal attempts targeting mastra endpoints. 7) Educate developers and system administrators about secure coding practices to avoid similar logic bypasses in path validation. 8) Regularly review and audit filesystem permissions to minimize sensitive data exposure even if directory listings occur.
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.