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 (security) : Path Traversal Bug #443

Merged
merged 1 commit into from
Jun 1, 2022
Merged

Fix (security) : Path Traversal Bug #443

merged 1 commit into from
Jun 1, 2022

Conversation

bhaskarvilles
Copy link
Contributor

Unsanitized input from r.headers and content_type = r.headers["content-type"] extension = mimetypes.guess_extension(content_type) file_name = "%s%s" % (uuid4().hex, extension) target_file = os.path.join(target_dir, secure(file_name)) resource flows into open(target_file, "wb").write(r.content), where it is used as a path. This may result in a Path Traversal vulnerability and allow an attacker to write arbitrary files.
Signed-off-by: Bhaskar dev@bhaskar.email

Signed-off-by: Bhaskar <dev@bhaskar.email>
@bhaskarvilles bhaskarvilles requested a review from a team May 14, 2022 14:46
@yeasy yeasy requested a review from fengyangsy May 17, 2022 20:48
@bhaskarvilles
Copy link
Contributor Author

Any update ? @yeasy @fengyangsy

Copy link
Contributor

@zhuyuanmao zhuyuanmao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense!

@zhuyuanmao zhuyuanmao merged commit 6c0735c into hyperledger-cello:main Jun 1, 2022
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.

2 participants