CVE-2025-54794: Claude Code Research Preview has a Path Restriction Bypass which could allow unauthorized file access

Published Aug 4, 2025
·
Updated

Claude Code is an agentic coding tool. In versions below 0.2.111, a path validation flaw using prefix matching instead of canonical path comparison, makes it possible to bypass directory restrictions and access files outside the CWD. Successful exploitation depends on the presence of (or ability to create) a directory with the same prefix as the CWD and the ability to add untrusted content into a Claude Code context window. This is fixed in version 0.2.111.

Other sources

Due to a path validation flaw using prefix matching instead of canonical path comparison, it was possible to bypass directory restrictions and access files outside the CWD. Successful exploitation depends on the presence of (or ability to create) a directory with the same prefix as the CWD and the ability to add untrusted content into a Claude Code context window.

Users on standard Claude Code auto-update received this fix automatically after release. Current users of Claude Code are unaffected, as versions prior to 1.0.24 are deprecated and have been forced to update.

Thank you to Elad Beber (Cymulate) for reporting this issue!

GitHub

Affected Software

2 affected componentsFixes available
npm/@anthropic-ai/claude-code<0.2.111
0.2.111
anthropic Claude Code Node.js<0.2.111

Event History

Aug 4, 2025
Advisory Published
via GitHub·03:15 PM
Data Sourced
via GitHub·03:15 PM
DescriptionWeaknessAffected Software
Aug 5, 2025
CVE Published
via MITRE·12:08 AM
Data Sourced
via MITRE·12:08 AM
DescriptionWeakness
Data Sourced
via NVD·01:15 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·01:15 AM
Affected Software
Feb 16, 58224
Event
via NVD·12:57 AM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-54794?

CVE-2025-54794 has been rated as a high severity vulnerability due to its potential for unauthorized file access.

2

How do I fix CVE-2025-54794?

To fix CVE-2025-54794, update the @anthropic-ai/claude-code package to version 0.2.111 or later.

3

What does CVE-2025-54794 affect?

CVE-2025-54794 affects the @anthropic-ai/claude-code package specifically up to version 0.2.111.

4

What types of attacks can CVE-2025-54794 facilitate?

CVE-2025-54794 can facilitate path traversal attacks, allowing unauthorized access to files outside the current working directory.

5

Is CVE-2025-54794 easy to exploit?

Exploitation of CVE-2025-54794 requires the ability to create a directory with the same prefix as the current working directory, making it moderately difficult.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203