Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. @anthropic-ai/claude-code
  4. ›
  5. CVE-2025-54794

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

August 4, 2025 (updated August 5, 2025)

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!

References

  • github.com/advisories/GHSA-pmw4-pwvc-3hx2
  • github.com/anthropics/claude-code
  • github.com/anthropics/claude-code/security/advisories/GHSA-pmw4-pwvc-3hx2
  • nvd.nist.gov/vuln/detail/CVE-2025-54794

Code Behaviors & Features

Detect and mitigate CVE-2025-54794 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.2.111

Fixed versions

  • 0.2.111

Solution

Upgrade to version 0.2.111 or above.

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Source file

npm/@anthropic-ai/claude-code/CVE-2025-54794.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 19 Aug 2025 12:19:50 +0000.