Why does a broken hash function undermine an HMAC?

For instance, what makes MD4 a bad choice for an HMAC? In this case I am asking about MD4 because its less than ideal. I know that a preimage attack can be used to undermine the system, but why? What is the attacker calculating?

• According to di.ens.fr/~fouque/pub/crypto07b.pdf, HMAC-MD4 is technically broken, but it requires $2^{88}$ MAC queries and $2^{95}$ MD4 operations. I think a paper a year later improved on that a bit. – forest Jul 28 '19 at 9:34