Re: Security findings

Alejandro Colomar via Mutt-dev <[email protected]> Sun, 3 May 2026 23:09:39 +0200
Newsgroups gmane.mail.mutt.devel
Message-ID <afe3tVcZbmK2OHda@devuan>
Hi Derek,

On 2026-04-29T11:01:15-0400, Derek Martin wrote:
>  3. No even vaguely modern system still uses MD5 in /etc/shadow anyway.

Actually, shadow still supports MD5, and still defaults to DES.
I'm working at the moment on removing support for it in a future
release, and default to SHA512.

<https://github.com/shadow-maint/shadow/pull/1454>
<https://github.com/shadow-maint/shadow/pull/1457>
<https://github.com/shadow-maint/shadow/pull/1456>
<https://github.com/shadow-maint/shadow/pull/1455>

In fact, support for SHA256/SHA512 was only conditionally compiled until
now; I've made it mandatory for the next release.

<https://github.com/shadow-maint/shadow/pull/1452>

However, I expect that everyone was compiling it with support for SHA*,
and setting it in their configuration to use it instead of DES.

> Historically MD5 hashes are encoded as the ascii-hexified values of
> the bytes (e.g. a value of 255 will be represented by the string
> "ff").

Thanks!  This confirms what I was suspecting after other messages.

> However on modern systems, MD5 is no longer used at all in
> /etc/shadow.  The modern format actually allows for multiple different
> hashes to be used simultaneously, and which hash is used is encoded in
> the password field itself.   Typically this is now SHA2-256 or
> SHA2-512, though I believe the latest (non-LTS) versions use something
> called yescrypt, which FWIW I have never seen used in any other
> context.  The actual hash portion is base64-encoded.

Hmmmm, thanks!  So it has changed.  Interesting!

> However, a better question is, should Mutt support CRAM-MD5 *at all*?
> MD5 is broken and hence no longer used for authentication on any
> modern system.  Unless IMAP4/SASL can't work without it (which I don't
> know, but that would surprise me) then probably what should actually
> happen here is that CRAM-MD5 support should be compiled out entirely
> by default, and only compiled in if the user configures it expressly,
> with ample documentation in the configure script help that you really
> shouldn't be using that...

+1

> It's probably somewhat likely that the reason this hasn't come up
> before is because no one is using it anyway.  Users who for some
> reason must use SASL are probably using something like SCRAM-SHA-256
> or Kerberos, and everyone else is using TLS.


Have a lovely night!
Alex

-- 
<https://www.alejandro-colomar.es>
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEES7Jt9u9GbmlWADAi64mZXMKQwqkFAmn3uZIACgkQ64mZXMKQ
wqkBcxAAsUvtGsCbt9U9CftDfd9zO1JX2HZA8iNwzO185+fBuVRgAw3YUvzRT/uK
wTyTR/CaihF6qzlyWTQlFhlkC9pfVNKYYT9EYFf6edDJomS1aIDv1boR012vLs5h
FG6mafuL6+Q9YGinBqJDbCCQjEvkXGFKwsySYRmGBx8ZFJZXIwEP+1YrZoTrA3ak
p+RKGEQE903WOZSLDJSdXHrz9i6XOOIPU2gvdoB1wu8zfL5etg8hUdsdY/ndh6H3
+uEZgQbq6J8diW6bik0Tfc1Z+w7NuPokV9+wOb8o/4YOeIeDnsLlUw1GDm+lxGds
itZZM79zcNx+2affWQ8ieCAtYN8lobwTY3vfXKl/CgxI+mTI7E9E7bH9eGodzGjF
JEb6cVUrEOQqXflU/qGQH6bkEu9Pe1HyD3xD7lieQ2P1Dug4nTsHp3zPeoB+iyqa
cEBhC+tAy7Q75ucX2+LctyQoOVxf+aODcsoDVUvljlINSG8WEUruI3RYiryKEq44
Vt6cxeNkav1yP6D1QQ2Wpf+dabtUKBj8Z2D4s4ZoywA2ziOHQO+mbqmxEVMHb/en
ZXXa4CcZq4XEisBcYXq/BLtk56j+TcAveRW+GajxkvtNg2nBm7wJkz2Pa3SgRTzy
qQQN1oB0dFzGc6354WSs6SOcqYTfo2TLxiOcxL3UYBdtBuwfY8M=
=F4a5
-----END PGP SIGNATURE-----