-
Notifications
You must be signed in to change notification settings - Fork 0
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
File uploads go to insecure location #11
Comments
It looks like Umbraco Forms has hard-coded all access to uploaded files to use Not only the The |
Hiya @sussexrick, Just wanted to let you know that we noticed that this issue got a bit stale and might not be relevant any more. We will close this issue for now but we're happy to open it up again if you think it's still relevant (for example: it's a feature request that's not yet implemented, or it's a bug that's not yet been fixed). To open it this issue up again, you can write For example:
This will reopen the issue in the next few hours. Thanks, from your friendly Umbraco GitHub bot 🤖 🙂 |
@umbrabot still relevant This is still the case in Forms 8.6.0. The workaround I produced is no longer maintained and may not work. |
@nul800sebastiaan Bit disappointing to see something like this still not resolved, I would of thought security would be Umbraco's number 1 priority. For a paid product such as forms, it seems to be always left behind.... |
Still relevant. Would like to see a more secure solution or at least a more easily configurable secure solution. |
Does anyone have a solution for this? Even something like locking down 'media/forms/' to users who aren't logged in would be better than nothing. |
+1 for secure form uploads by default. Given the nature of some of the files that users could be uploading, this should really be a core feature (especially for a licensed product IMO). @StenersonB We've attempted to workaround this with a cutom HttpModule, specifically looking to intercept the incoming request, check if it's trying to access a form upload, if so check if the user is logged into the backoffice and return a forbidden error if not. This might be an approach to consider in the meantime until it's supported in the core product?
You can then add this to the |
We've added an module along the lines of that suggested by @alanwthom above - thanks very much for this contribution Alan. We've extended it a little to handle further cases - i.e. a back-office user that is logged in but doesn't have access to the "Forms" section, or doesn't have access to manage forms, or lastly, does have access to manage forms but not the one for which the uploaded file was submitted - for each of these a 403 response will be provided as well. To be released in 8.10.0 and 9.2.0. |
@AndyButland this works to me and I only have an She has the following cookies set, but get It seems the |
@AndyButland @nikolajlauridsen does the changes in https://github.com/umbraco/Umbraco-CMS/pull/13404/files also need to apply to how this is restricted in Umbraco Forms? |
Yes, it looks like it. I can see we are doing something similar to the original code in the middleware used to protect the media requests here. Will have a look for the next patch releases. Thanks for raising and digging out the link to the fix. |
Thanks @AndyButland 🙌😎 I am not sure in which scenario the |
Looking at the original issue it comes about when the amount of "claims" in the cookie exceeds a certain level, which in Umbraco terms is most likely number of user groups. So could be an administrator is fine, but an editor in several user groups would trigger the problem. |
Yes, it makes sense as I and Umbraco support team member was administrator user, but customer only with editors user group assigned. |
First logged as http://issues.umbraco.org/issue/CON-1454.
What did you do?
Create a form in Umbraco Forms 6.0.5 on Umbraco 7.7.6 with a file upload type. Fill in the form by uploading a file and clicking submit.
What did you expect to happen?
The file could contain private and confidential information or personal data, so I would expect it to be accessible only to people with permissions to view data submitted to that form.
Most likely I would expect it to upload to another
IFileSystem
configured inFileSystemProviders.config
with a different alias.What actually happened?
It was uploaded to the standard media folders via the
IFileSystem
. This location is typically available to anyone who can view the entire website, which on a public website means anyone with an Internet connection. It has a URL that's difficult to guess, but that's not sufficient protection for personal or private data.Workaround
I've published a NuGet package,
Escc.Umbraco.Forms.Security
, which includes an updatedFileSystemProvider
which routes forms uploads to a separate folder that can be secured properly.https://github.com/east-sussex-county-council/Escc.Umbraco.Forms
https://www.nuget.org/packages?q=Escc.Umbraco.Forms
The text was updated successfully, but these errors were encountered: