GitHub Advisoryadvisory · npm

GHSA-pmw4-pwvc-3hx2 Claude Code Research Preview has a Path Restriction Bypass which could allow unauthorized file access

HIGH Published 2025-08-04 Modified 2025-08-05 Official page ↗
Aliases
CVE-2025-54794
Ecosystem
npm
Packages
@anthropic-ai/claude-code
Severity
High
CVSS vector
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Weaknesses
CWE-22
Reviewed
2025-08-04

Affected packages

• npm @anthropic-ai/claude-code: < 0.2.111 → fixed in 0.2.111

Description

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!

Related

Alias · CVE (1)

Weakness · CWE (1)

  • CWE-22 Improper Limitation of a Pathname to a Restricted Directory weakness

References