King-Avis is a Prestashop module developed by Webbax. In versions older than 17.3.15, the latter suffers from an authenticated path traversal, leading to local file read.
There was a file download.php, that could be used to download statistical reports as CSV files. To protect from unauthorised access, the download feature was protected by a token, as shown below:
1 | $token = Tools::getValue('token'); |
If the token is incorrect, the file exits and no content is returned. However, if the token is correct, the path is extracted from the parameter file and used without being sanitised :
1 | ... |
It means that administrators (supposed to know this token) can read arbitrary local files. Also, there is no need to have an active admin session to browse to this file.
This behaviour has been patched by removing this dangerous feature.
Timeline
- 24.05.2023: Vendor notified
- 25.05.2023: Vendor acknowledged and published a patch
- 26.05.2023: NCSC notified