Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix qpress directory traversal vulnerability (PierreLvx#6)
A bad actor user can prepare the payload as: ``` mkdir -p AAAAAAAAA/secure_file_priv_dir touch AAAAAAAAA/secure_file_priv_dir/evil.so qpress -r AAAAAAAAA payload.qp Then edit the payload.qp in a hex editor or sed to replace AAAAAAAAA with ../../../ (example: sed -i 's/AAAAAAAAA/..\/..\/..\//' payload.qp) ``` Fix bug by checking the directory and reject the command if find the attempt to traversal Test: see example above and try to reproduce it. Before fix you can observe traversal. After fix - the error message(File path contains directory traversal which is not allowed.) shown, no traversal observe. All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc. Co-authored-by: Mikhail Chalov <mcchalov@amazon.com>
- Loading branch information