The attacker must be able to upload a file and the server must be running a PHP version prior to 8. A successful exploitation of this vulnerability allows executing arbitrary code and accessing the underlying filesystem. However, PHP wrappers being case insensitive, this patch can be bypassed using `PHAR://` instead of `phar://`. To fix this issue, the string is now passed to the `strpos()` function and if it starts with `phar://`, an exception is raised. This allowed users to trigger a deserialization on arbitrary PHAR files. In the original vulnerability, a file name with a `phar://` wrapper could be sent to the `fileExists()` function, equivalent to the `file_exists()` PHP function. Version 1.4.2 added a check `if (\strpos($filename, 'phar://') = 0)` in the `prepareOutput` function to resolve this CVE, however if the user is able to control the second parameter of the `generateFromHtml()` function of Snappy, it will then be passed as the `$filename` parameter in the `prepareOutput()` function. # Issue On March 17th the vulnerability CVE-2023-28115 was disclosed, allowing an attacker to gain remote code execution through PHAR deserialization. Knplabs/knp-snappy is a PHP library allowing thumbnail, snapshot or PDF generation from a url or a html page. VDB-236206 is the identifier assigned to this vulnerability. The exploit has been disclosed to the public and may be used. The manipulation of the argument Files leads to path traversal: './filedir'. This vulnerability affects unknown code of the file \Service\FileDownload.ashx. A vulnerability classified as problematic was found in Chengdu Flash Flood Disaster Monitoring and Warning System 2.0.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |