You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Silverstripe Gridfield Queued Export stores CSV files in the assets/.exports dir. These files get deleted once downloaded, but if for some reason, you never download the file, the file will be stuck in limbo forever and never get deleted.
It also completely bypasses all the assets logic and directly writes and unlinks the files. There's some attempt to write a .htaccess file to block direct download from the file, but that method is fallible because your webserver could be configured to ignore .htaccess files or you might be running your site on NGINX or IIS. The file names are also random, which minimise the risk that someone will stumble on them.
It's arguable whatever this is an actual security vulnerability. I guess you need a lot of things to go wrong for the files to be disclosed publicly. It sure is not good security architecture.
At the very least, it's a GDPR problem because the CSV data could be stuck there without a way to delete it.
Silverstripe Gridfield Queued Export stores CSV files in the
assets/.exports
dir. These files get deleted once downloaded, but if for some reason, you never download the file, the file will be stuck in limbo forever and never get deleted.It also completely bypasses all the assets logic and directly writes and unlinks the files. There's some attempt to write a
.htaccess
file to block direct download from the file, but that method is fallible because your webserver could be configured to ignore.htaccess
files or you might be running your site on NGINX or IIS. The file names are also random, which minimise the risk that someone will stumble on them.It's arguable whatever this is an actual security vulnerability. I guess you need a lot of things to go wrong for the files to be disclosed publicly. It sure is not good security architecture.
At the very least, it's a GDPR problem because the CSV data could be stuck there without a way to delete it.
This is the bit that creates the file.
silverstripe-gridfieldqueuedexport/src/Jobs/GenerateCSVJob.php
Lines 176 to 247 in 06a09ca
This is the bit that serves the file and delete it.
silverstripe-gridfieldqueuedexport/src/Forms/GridFieldQueuedExportButton.php
Lines 234 to 261 in 06a09ca
Notes
This was initially reported as a security issue. We decided to threat it as a regular issue since there isn't anything directly exploitable.
The text was updated successfully, but these errors were encountered: