100% CPU for large attachments

Usermin webmail is slow when opening an email with a large attachment. For an email with a 1 MB attachment there is a slight delay (tens of seconds) but opening a larger attachment, e.g. 15 MB, can take ages - looking at the process it is using 100% CPU and has been going for > 25mins.

This looks related to nobody’s post here:

From the web page titles, the following versions are installed:
Virtualmin 4.11.gpl
Usermin 1.600

It took ~38mins to finish.