Artifex Ghostscript before 10.03.1, when Tesseract is used for OCR, has a directory traversal issue that allows arbitrary file reading (and writing of error messages to arbitrary files) via OCRLanguage. For example, exploitation can use debug_file /tmp/out and user_patterns_file /etc/passwd.
References
- https://bugs.ghostscript.com/show_bug.cgi?id=707510
- https://bugs.ghostscript.com/show_bug.cgi?id=707510
- https://git.ghostscript.com/?p=ghostpdl.git%3Ba=commitdiff%3Bh=3d4cfdc1a44
- https://git.ghostscript.com/?p=ghostpdl.git%3Ba=commitdiff%3Bh=3d4cfdc1a44
- https://www.openwall.com/lists/oss-security/2024/07/03/7
- https://www.openwall.com/lists/oss-security/2024/07/03/7