#1631·skills

Path traversal via unsanitized skill_name in run_eval.py

Author: truongsontungCreated Aug 22, 2026Updated Sep 7, 2026

Summary

The run_eval.py script uses skill_name from SKILL.md frontmatter directly in file path construction without sanitization, allowing path traversal.

Vulnerability

Location: skills/skill-creator/scripts/run_eval.py:54

project_commands_dir = Path('~/.claude/commands')
clean_name = re.sub(r'[^a-z0-9-]', '', skill_name.lower())
command_file = project_commands_dir / f{clean_name}.md

The clean_name only strips non- characters but doesn't prevent sequences. An attacker providing a SKILL.md with would write the command file outside the intended directory.

Compare with generate_review.py (line 461): This file has SSRF via webbrowser.open, but the port validation constrains it to integer.

Impact

  • Arbitrary file write outside ~/.claude/commands/
  • Potential RCE if combined with other vulnerabilities

Recommended Fix

  1. Call the existing quick_validate.py validation
  2. Or explicitly reject in the name
  3. Use Path.resolve() and check it stays within the target directory

References

  • quick_validate.py already has regex: ^[a-z0-9-]+$
  • Related: skills/skill-creator/scripts/run_eval.py line 54