Skip to content

πŸ›‘οΈ Sentinel: [CRITICAL] Fix Path Traversal via Symbolic Links#819

Open
georgi wants to merge 3 commits intomainfrom
sentinel-fix-symlink-traversal-12244774363765268999
Open

πŸ›‘οΈ Sentinel: [CRITICAL] Fix Path Traversal via Symbolic Links#819
georgi wants to merge 3 commits intomainfrom
sentinel-fix-symlink-traversal-12244774363765268999

Conversation

@georgi
Copy link
Copy Markdown
Contributor

@georgi georgi commented Apr 1, 2026

This PR fixes a security vulnerability in src/nodetool/io/path_utils.py where os.path.abspath was being used to evaluate whether a requested file path was within the designated workspace_dir.

🚨 Severity: CRITICAL
πŸ’‘ Vulnerability: Symlink-based Path Traversal
🎯 Impact: If a malicious user or external process were able to create a symbolic link within their workspace that points to a directory outside of the workspace (e.g., / or /etc), os.path.abspath would not resolve the symlink. This allowed requests traversing the symlink to pass the commonpath boundary check, granting arbitrary read/write access to the host filesystem.
πŸ”§ Fix: Replaced os.path.abspath with os.path.realpath for both the workspace root and the target path. os.path.realpath fully resolves all symbolic links before evaluating the boundaries, correctly denying access to outside files.
βœ… Verification: A test case test_resolve_workspace_path_with_symlink_traversal_attack was added to tests/common/test_path_utils.py to ensure traversing an outside symlink correctly throws a ValueError. The fix has been verified and passes tests.


PR created automatically by Jules for task 12244774363765268999 started by @georgi

Co-authored-by: georgi <19498+georgi@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

πŸ‘‹ 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

google-labs-jules bot and others added 2 commits April 1, 2026 10:54
Co-authored-by: georgi <19498+georgi@users.noreply.github.com>
Co-authored-by: georgi <19498+georgi@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant