Impact
Mathesar has a feature to import data into a new table via uploading a CSV file. During the import process, the uploaded CSV file is cached within Mathesar and never actually deleted.
Prior to version 0.2.0, all authenticated users were able to use Mathesar's API to read the cached data for all imports which had ever been performed by any user. This could allow one authenticated user to maliciously read another user's uploaded data. (Anonymous users are not affected — they have never been able to read any cached import data.)
If any of your users might have imported CSV data through Mathesar which they would like to keep private from other users within the same Mathesar installation, then we recommend moving your Mathesar installation to 0.2.0.
Fix
PR #4157 fixes this security bug by only allowing each user to read their own cached import data.
This fix is included in the 0.2.0 release.
Work around
To mitigate an older version of Mathesar against this vulnerability without upgrading, you can delete all the cached import data files with the following steps.
-
Run docker ps
to identify the name of your running Mathesar container. This is commonly named mathesar_service
but might vary depending on how you have installed Mathesar
-
Run docker exec -it mathesar_service bash
to open a shell within your running Mathesar service container. (Replace "mathesar_service" with the name of your container determined above, if needed.)
-
From within the shell, run the following command to list your cached import data files.
-
Run the following command to remove all your cached import data files:
Note that after performing this work-around, subsequent imports will still be vulnerable to this bug until you upgrade to Mathesar 0.2.0.
Impact
Mathesar has a feature to import data into a new table via uploading a CSV file. During the import process, the uploaded CSV file is cached within Mathesar and never actually deleted.
Prior to version 0.2.0, all authenticated users were able to use Mathesar's API to read the cached data for all imports which had ever been performed by any user. This could allow one authenticated user to maliciously read another user's uploaded data. (Anonymous users are not affected — they have never been able to read any cached import data.)
If any of your users might have imported CSV data through Mathesar which they would like to keep private from other users within the same Mathesar installation, then we recommend moving your Mathesar installation to 0.2.0.
Fix
PR #4157 fixes this security bug by only allowing each user to read their own cached import data.
This fix is included in the 0.2.0 release.
Work around
To mitigate an older version of Mathesar against this vulnerability without upgrading, you can delete all the cached import data files with the following steps.
Run
docker ps
to identify the name of your running Mathesar container. This is commonly namedmathesar_service
but might vary depending on how you have installed MathesarRun
docker exec -it mathesar_service bash
to open a shell within your running Mathesar service container. (Replace "mathesar_service" with the name of your container determined above, if needed.)From within the shell, run the following command to list your cached import data files.
Run the following command to remove all your cached import data files:
Note that after performing this work-around, subsequent imports will still be vulnerable to this bug until you upgrade to Mathesar 0.2.0.