AI File to Text
The module does not sufficiently check whether the current user is permitted to view a file before extracting its contents. An ordinary account on the site could view the contents of files they could not otherwise download, including files held in the private file system. They could not alter any files or settings.
- Who could do thisOnly someone with a login on your site.
- Does it apply to youAn attacker must have a role with the access right to invoke AI tools.
- Has it been used in attacksNo sign of it.
- How urgentDrupal rates this moderately critical. Include it in your next routine update, within the month.
Tell your developerUpdate AI File to Text to 1.0.1.
For developers: what the fix changed
The fix adds an access check in `src/Plugin/AiFunctionCall/FileToText.php` using a new `loadAccessibleFileByUri` method to ensure the current user has permission to view the requested file before extracting its text.
Also in this release The release also hardens XML loading against XXE and adds protection against ZIP decompression bombs.
.cspell-project-words.txt+6 −0ai_file_to_text.services.yml+4 −0composer.json+1 −1src/Extractor/OdtExtractor.php+7 −2src/Extractor/PopplerPdfExtractor.php+3 −1src/Plugin/AiFunctionCall/FileToText.php+48 −1 fixsrc/Plugin/DocumentLoader/FileDocumentLoader.php+177 −2