Skip to content

fix: prevent path traversal in save_text_file#1555

Open
qvl15 wants to merge 1 commit into
agent0ai:mainfrom
qvl15:fix/path-traversal-save-text-file
Open

fix: prevent path traversal in save_text_file#1555
qvl15 wants to merge 1 commit into
agent0ai:mainfrom
qvl15:fix/path-traversal-save-text-file

Conversation

@qvl15
Copy link
Copy Markdown

@qvl15 qvl15 commented Apr 24, 2026

Fix path traversal vulnerability in save_text_file
Fixes #1541
The previous check used startswith() which can be bypassed when base_dir is /. Replaced with is_relative_to() for proper path validation.

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.

Bug: Path Traversal in save_text_file

1 participant