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

Project import vulnerable to arbitrary file write #1927

Closed
itsacoderepo opened this issue Jan 2, 2019 · 3 comments
Closed

Project import vulnerable to arbitrary file write #1927

itsacoderepo opened this issue Jan 2, 2019 · 3 comments
Assignees
Labels
Status: Needs More Information Indicates issues that lack sufficient information for the project team to act upon. vulnerability Security vulnerability which needs fixing

Comments

@itsacoderepo
Copy link

Describe the bug
The import of a project is prone to a path traversal and thus an arbitrary file write.

To Reproduce
Steps to reproduce the behavior:

  1. Download payload.txt
  2. gzip payload.txt, payload.txt.gz is greated
  3. Go to OpenRefine, Import Projects
  4. Choose payload.txt.gz
  5. Import file
  6. cat /tmp/ohno should show the content of the file.

Current Results
The first 100 bytes are from the file payload.txt are chosen as path, not the filename itself. An error is also shown but is not related to the path traversal.

Expected behavior
Show an error, warn user, do not write file outside of the project folder.

Video
project_import_vuln.zip

Desktop (please complete the following information):
Not important

OpenRefine (please complete the following information):

  • Demo with 3.1 but should work with master

Datasets
Payload file
https://github.com/OpenRefine/OpenRefine/files/2721399/payload.txt

Additional context
Please also update dependencies. The ant library is out of date and sloppy (compared to other) handling (tar) archive header.

If you have questions, you can reach me at "niko at-sign shiftleft.io" or https://twitter.com/0x4d5a.

@nluedtke
Copy link

This was assigned CVE-2019-3580.

@wetneb wetneb added the vulnerability Security vulnerability which needs fixing label Jan 26, 2019
@wetneb wetneb self-assigned this Feb 7, 2019
@wetneb wetneb added this to the 3.2 milestone Feb 7, 2019
@wetneb wetneb added the Status: Needs More Information Indicates issues that lack sufficient information for the project team to act upon. label Feb 19, 2019
@wetneb
Copy link
Sponsor Member

wetneb commented Feb 19, 2019

@itsacoderepo I think your instructions to reproduce the vulnerability are missing one step: rename payload.txt.gz to payload.tar.gz.

But even with that fix I cannot reproduce this - as far as I can tell this was fixed by #1901. So closing as non reproducible in a few days unless I missed something.

@wetneb
Copy link
Sponsor Member

wetneb commented Feb 22, 2019

Closing as non reproducible.

@wetneb wetneb closed this as completed Feb 22, 2019
@wetneb wetneb removed this from the 3.2 milestone Feb 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs More Information Indicates issues that lack sufficient information for the project team to act upon. vulnerability Security vulnerability which needs fixing
Projects
None yet
Development

No branches or pull requests

3 participants