This upstream patch has been incorporated to fix the problem:
Fix htmlfontify.el command injection vulnerability.
* lisp/htmlfontify.el (hfy-text-p): Fix command injection
vulnerability. (Bug#60295)
Origin: upstream, commit
807d2d5b3a7cd1d0e3f7dd24de22770f54f5ae16
Bug: https://debbugs.gnu.org/60295
Bug-Debian: https://bugs.debian.org/
1031730
Forwarded: not-needed
(defun hfy-text-p (srcdir file)
"Is SRCDIR/FILE text? Use `hfy-istext-command' to determine this."
- (let* ((cmd (format hfy-istext-command (expand-file-name file srcdir)))
+ (let* ((cmd (format hfy-istext-command (shell-quote-argument (expand-file-name file srcdir))))
(rsp (shell-command-to-string cmd)))
(string-match "text" rsp)))