Package: mutt
Version: 2.0.5-1
Tags: patch, security

Dear Maintainer,
the mutt package has a mailcap entry with quoted %-escapes. That is considered 
unsafe. Proper escaping should be left to the programs using the entry.
Mutt itself already handles it correctly, see the manual:
http://www.mutt.org/doc/manual/#secure-mailcap

The discussion dates back to 1999:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=33486
resulting in this Lintian tag (triggered by mutt):
https://lintian.debian.org/tags/quoted-placeholder-in-mailcap-entry.html

See also grave bug #930908, which was recently closed because "a Lintian test 
already exists":
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930908
S-nail also agrees:
https://www.sdaoden.eu/code-nail.html#37

If a certain combination of mail user agent (or document opener) and mailcap 
rule is used, you can own a machine just by making the user open a malicious 
email, or a file with a malicious name.

RFC-1524 actually leaves quoting policy unspecified, which led to nearly 30 
years of bad security around mailcap, but you can see it from the examples:
https://tools.ietf.org/html/rfc1524#page-11

If you need more information let me know.

Thanks,
MNZ
diff --git a/debian/mutt.mime b/debian/mutt.mime
index 79f40a4..af3f520 100644
--- a/debian/mutt.mime
+++ b/debian/mutt.mime
@@ -1 +1 @@
-message/rfc822; mutt -Rf '%s'; edit=mutt -f '%s'; needsterminal
+message/rfc822; mutt -Rf %s; edit=mutt -f %s; needsterminal

Reply via email to