First let me thank you for bringing this point to our attention.
You're right, md5.c file is missing even after defining MBEDTLS_MD5_C module through CubeMX interface. This is reported internally to be fixed. I'll keep you posted with the updates.
Sorry for any inconvenience that this may cause.
Meanwhile, you can choose Copy all used libraries into the project folder through Project Manager view> Code Generator tab.
In fact, Checking Copy all used libraries into the project folder optionresults a generated project containing all the source and header files of the selected middleware and drivers without taking account whether those drivers libraries are relevant or not to the user configuration in CubeMX.
Thus, md5.c file will be correctly generated in the project directory.
Thank you for your reply. The solution you provide has solved my problem temporarily. It's my pleasure to help you to improve the software quality. That will be beneficial to the entire community. I hope everyone can get help here.