-
Notifications
You must be signed in to change notification settings - Fork 77
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
Vulnerability - Arbitrary File Download #67
Comments
Thanks for reporting the issue. Would be awesome if you could PR a fix for that. (Also, in future it's better to report security issues via mail or the security tab) |
Sorry, but I don't have permissions to draft advisories and there is no security policy defined. I might try to do a PR with the fixes later. |
I thought you would be able to draft an advisory, that's weird. I've copied the security policy from Laravel Excel now. Thought it was already in place. Thanks for looking into the PR! |
I was trying to do the PR, but I think the package For the authentication, would be enough to add this method in the controller: /**
* Instantiate a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
} Of course, this will force to be authenticated in Laravel Nova (I'm not sure if that will conflict any scenario). |
@arall maatwebsite/excel does use laravel filesystem, however I think the personal who PR'd this did it like this, so he wouldn't have to clean-up after downloading (I believe) Forced to be authenticated would be good I think. |
Given the lack of updates on this critical issue, we've forked the project and deployed our solution to https://github.com/pdmfc/Laravel-Nova-Excel |
Fixed in next release |
The following controller method is vulnerable to arbitrary file download:
(No authentication is needed)
Example Proof of Concept:
I think generated files should be stored in
storage/app/laravel-nova-excel
(or something similar) and the controller must ensure that files are only fetched from that directory (preventing moving to parent by injecting../
in the filename etc).Perhaps changing the
path
parameter intofile
(and enforce previous checks) would be a solution.Also, authentication must be required.
The text was updated successfully, but these errors were encountered: