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

Majestic's http allows downloading files from fs-root ("/") #225

Open
lyukshinra opened this issue Jan 14, 2025 · 0 comments
Open

Majestic's http allows downloading files from fs-root ("/") #225

lyukshinra opened this issue Jan 14, 2025 · 0 comments

Comments

@lyukshinra
Copy link

  • fw_version: 2.5.01.13
  • mj_version: master+b8ae1de, 2025-01-05
  • installation method: sysupgrade rootfs
  • modified majestic.yaml: yes

Issue description

For authenticated users Majestic's built-in http-server allows to download any files from any path of filesystem if file not found in http root directory. It looks like Majestic trying to search such files from fs-root ("/"). So http-root not limited to /var/www/. This probably is security issue.

Expectations

If url points to file, not existing in http-root directory (/var/www/), http server must return 404 error. Of cource exept special url-paths, like statistics.

Steps to reproduce

Try to http-get any file, that not exists in /var/www/ by it absolute path.
http://[camera_ip]/etc/passwd
http://[camera_ip]/etc/shadow

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

No branches or pull requests

1 participant