CVE-2025-61685

CVSS 6.5 Medium
  • CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
  • Published: 2025-10-03T23:15:29.870

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.

Related CVE by CWE

No related CWE found.

Top CVE for Vendor

No vendor taxonomy on this entry.

Recently Exploited Similar Vulnerabilities

No recent KEV-listed items for this vendor/product.

How to fix CVE-2025-61685

CVE-2025-61685 is a medium severity vulnerability affecting the affected product.

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 […]

Affected Versions:
Vulnerable: 0.13.8 - 0.13.20
Safe: ≥ 0.13.21

Exploit Difficulty: EASY
⏱️ Time to exploit: < 1 hour
🛠️ Required skills: Basic web security knowledge
💰 Public exploits: Likely available

How to Fix:

1 Identify affected systems

- Check if you're running the affected product
- Verify version (vulnerable: 0.13.8 - 0.13.20)

2 Immediate actions

- Update to ≥ 0.13.21 or later
- If patching is not immediately possible: restrict network exposure, apply least-privilege access

3 Verification

- Test the fix in a staging environment first
- Review logs for signs of exploitation
- Monitor for IOCs (Indicators of Compromise)

4 Long-term prevention

- Enable automatic security updates
- Set up vulnerability monitoring
- Review and harden security configurations

Exploit Difficulty Assessment

EASY
⏱️ Time to Exploit: < 1 hour
🛠️ Skills Required: Basic web security knowledge
💰 Public Exploits: Likely available

Affected Versions

Vulnerable: 0.13.8 - 0.13.20
Safe: ≥ 0.13.21

Vulnerability Timeline

Oct 03, 2025
Vulnerability Published

CVE details first published to NVD database

Nov 12, 2025
Imported to Database

Added to this CVE tracking system

Detection Rules & IOCs

No specific detection rules generated for this vulnerability type.

No vendor/product data available.