Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix path traversal vulnerability #261

Merged
merged 1 commit into from
Mar 20, 2023
Merged

Fix path traversal vulnerability #261

merged 1 commit into from
Mar 20, 2023

Conversation

plamentotev
Copy link
Member

@plamentotev plamentotev commented Mar 19, 2023

AbstractUnArchiver#extractFile uses String#startsWith to verify whether the target file is located inside the destination directory. This check gives false negative for cases such as /opt/directory and /opt/dir. /opt/directory starts with /opt/dir although it is not inside it. This is a limited path traversal vulnerability.

Fixes: #260

AbstractUnArchiver#extractFile uses String#startsWith to verify
whether the target file is located inside the destination directory.
This check gives false negative for cases such as /opt/directory and
/opt/dir. /opt/directory starts with /opt/dir although it is not inside it.
This is a limited  path traversal vulnerability.

Fixes: #260
@plamentotev plamentotev merged commit 8a37b7e into master Mar 20, 2023
@plamentotev plamentotev deleted the fix-path-traversal branch March 20, 2023 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AbstractUnArchiver extractFile has Partial Path Traversal Vulnerability
2 participants