If the husk has the base value of the minecraft attribute:follow_range, then it will not see you, which means that it will not be able to harm you. But if you come close to the husk and start attacking it, it can cause damage to you. Steps to reproduce:
Run the command /summon minecraft:husk in order to summon a husk.
Run the /attribute @e[type=minecraft:husk,limit=1] minecraft:follow_range base set 0 command to change the base value of the minecraft:follow_range husk attribute to zero.
Switch to survival mode by running the command /gamemode survival if you haven't already done so.
Get as close to the husk as possible, start attacking it with your hand (not your weapon) and do this until the husk does damage to you. Note: this works not only on cadavers, but also on all mobs in general (with some exceptions), but I reproduced it on husk.
Thank you for helping us improve Minecraft! We saved your files: