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

ZIP Bombs and large ZIP files being allowed in file uploads #7406

Open
tanmaypardeshi opened this issue Apr 25, 2024 · 0 comments · May be fixed by #7407
Open

ZIP Bombs and large ZIP files being allowed in file uploads #7406

tanmaypardeshi opened this issue Apr 25, 2024 · 0 comments · May be fixed by #7407

Comments

@tanmaypardeshi
Copy link

ZIP Bombs and Large ZIP files are being allowed to be uploaded on the portal

  • ASVS V12.1 File Upload Requirements is being violated in this bug.
  • To be specific, it is ASVS 12.1.2 : Verify that files are checked for "zip bombs" - small input files that decompress into huge files thus exhausting file storage limits.
  • This affects CWE 409 - Improper handling of highly compressed data(data amplification)

To Reproduce

document_upload

Steps to reproduce the behavior:

  1. Launch the OpenEMR application.
  2. Launch the OpenEMR application and sign in using the admin credentials ([Username: admin, Password: pass] by default).
  3. Go to the site https://theaviary.me/Zip-Bomb/42.html and download the zip file under the old version. This is because the new version requires a password before unzipping.
  4. Once the file has been downloaded, go back to the OpenEMR portal where you had logged the admin in using the credentials.
  5. At the top of the page in the navigation bar, go to Admin->Document Templates->Documents. This will take you to the “Document Template Management" Page
  6. Upload the downloaded zip file in step c under the “Upload a Template” option on the “Document Template Management" page.

Expected behavior

  1. The file should not be allowed to be uploaded because it is a zip bomb and it should be checked and rejected during the upload itself

Client configuration

  • Browser: Chrome 124.0.6367.79 (Official Build) (arm64)
  • OpenEMR version:
  • Operating system: MacOS/Linux/Windows
@tanmaypardeshi tanmaypardeshi linked a pull request Apr 25, 2024 that will close this issue
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 a pull request may close this issue.

1 participant