π‘οΈ Sentinel: [CRITICAL] Fix Path Traversal (Zip Slip) in Skills Import#132
π‘οΈ Sentinel: [CRITICAL] Fix Path Traversal (Zip Slip) in Skills Import#132thirdeyenation wants to merge 1 commit into
Conversation
Co-authored-by: thirdeyenation <133812267+thirdeyenation@users.noreply.github.com>
|
π Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a π emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
π¨ Severity: CRITICAL
π‘ Vulnerability: Zip Slip (Path Traversal) in
helpers/skills_import.pywherezipfile.ZipFile.extractall()is called without validating archive members. This allows a maliciously crafted ZIP file to overwrite sensitive files outside the intended target directory.π― Impact: Remote code execution (RCE) or sensitive data overwrite. When a user or agent imports an external skill from a malicious ZIP file, files outside the
tmp/skill_imports/directory could be overwritten (e.g., placing arbitrary executables or overwriting.bashrcor configuration files).π§ Fix: Manually validate each member of the ZIP archive (
z.namelist()) by securely resolving its target destination usingPath.resolve()and ensuring it remains within the intended extraction directory usingPath.is_relative_to(). If an unsafe path is detected, it raises aValueErrorto fail securely.β Verification: Ran
pytest tests/test_skills_runtime.pyto ensure skill parsing/imports still function correctly, and verified that any attempt to extract an archive with path traversal characters throws an exception.PR created automatically by Jules for task 8597553096293329101 started by @thirdeyenation