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

bug: Risk of leaking the scan result files #16

Closed
1 task done
psyray opened this issue Apr 22, 2024 · 3 comments · Fixed by #92
Closed
1 task done

bug: Risk of leaking the scan result files #16

psyray opened this issue Apr 22, 2024 · 3 comments · Fixed by #92
Assignees
Labels
bug Something isn't working

Comments

@psyray
Copy link
Contributor

psyray commented Apr 22, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Submitted by @confd0

The huntr.com link for reNgine is down, and email is not responsed. so I put it here.
image

I just install reNgine v2.0.3 and find a nginx config file: https://github.com/yogeshojha/rengine/blob/f362189c9b253fd38c7c17c08e5cfc87aee0bfaf/config/nginx/rengine.conf

image

look like I can read any scan results file from other rengine site if I know the file names, and the files names can be brute force:

image

Expected Behavior

non-login user should not have privilege to read scan result files

Steps To Reproduce

brute force https://rengine_example.com/media/<domain>_<int>/subdomains_sublister.txt , change <domain> and <int> to fuzz.

Environment

- reNgine: 2.0.3
- OS: Linux
- Python: 
- Docker Engine: 
- Docker Compose: 
- Browser:

Anything else?

No response

@psyray psyray added bug Something isn't working security labels Apr 22, 2024
@psyray psyray self-assigned this May 28, 2024
@Talanor
Copy link
Contributor

Talanor commented May 29, 2024

To go further, if we implement user scopes by project (as planned), even logged in users shouldn't have access to all report files.
This needs further reflection, but maybe the files shouldn't be served as static files but be served behind a view with a permission decorator ?

@psyray
Copy link
Contributor Author

psyray commented Jun 3, 2024

To go further, if we implement user scopes by project (as planned), even logged in users shouldn't have access to all report files. This needs further reflection, but maybe the files shouldn't be served as static files but be served behind a view with a permission decorator ?

Yes you're right, this issue need more reflection as we will implement ACL
To address quickly this issue, I think using an UUID, instead of the scan_id, for the folder name, could be a good workaround while we working on a more complete solution

@psyray
Copy link
Contributor Author

psyray commented Jun 3, 2024

Done

@psyray psyray added this to the v2.0.7 release milestone Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants