In versions 2.1.63 through 2.1.83 of Claude Code, the folder trust determination logic used the git worktree commondir file without validating its contents. An attacker could craft a malicious repository with a commondir file pointing to a path the victim had previously trusted, causing Claude Code to bypass its trust confirmation dialog and immediately execute hooks defined in `.claude/settings.json`. Exploitation requires the victim to clone the malicious repository and run Claude Code within it, and the attacker must know or guess a path the victim had already trusted. This issue has been fixed in version 2.1.84.
Claude Code versions 2.1.63-2.1.83 contain a folder trust bypass vulnerability where malicious git worktree commondir files can trick the application into executing untrusted hooks without user confirmation. An attacker can exploit this by crafting a repository that references previously trusted paths, bypassing security dialogs and executing arbitrary code.
تؤثر هذه الثغرة على Claude Code من خلال عدم التحقق من محتويات ملف commondir في git worktree، مما يسمح بتجاوز آليات التحقق من ثقة المجلد. يمكن للمهاجم إنشاء مستودع ضار يشير إلى مسار موثوق مسبقاً لدى الضحية، مما يؤدي إلى تنفيذ خطافات تعسفية محددة في .claude/settings.json دون طلب تأكيد من المستخدم.
إصدارات Claude Code من 2.1.63 إلى 2.1.83 تحتوي على ثغرة تجاوز ثقة المجلد حيث يمكن لملفات git worktree الضارة خداع التطبيق لتنفيذ خطافات غير موثوقة دون تأكيد المستخدم. يمكن للمهاجم استغلال هذا بإنشاء مستودع يشير إلى مسارات موثوقة مسبقاً، مما يتجاوز حوارات الأمان وتنفيذ كود تعسفي.
Immediately upgrade Claude Code to version 2.1.84 or later. Review and audit any repositories cloned from untrusted sources, particularly those containing .claude/settings.json files with hook definitions. Clear previously trusted folder configurations if suspicious activity is detected. Implement code review processes for any hooks executed by development tools.
قم بترقية Claude Code فوراً إلى الإصدار 2.1.84 أو أحدث. راجع وتدقيق أي مستودعات مستنسخة من مصادر غير موثوقة، خاصة تلك التي تحتوي على ملفات .claude/settings.json بتعريفات خطافات. امسح تكوينات المجلدات الموثوقة مسبقاً إذا تم اكتشاف نشاط مريب. طبق عمليات مراجعة الكود لأي خطافات يتم تنفيذها بواسطة أدوات التطوير.