This issue occurs due to invalid imgdb.tgz file.
Find an ESXi host with the same patch level that has a correct imgdb.tgz and copy it over (through a shared lun or scp).
Note: If you can not find an host with the same patch level, then do not apply this as the database will report a patch level which does not match the reality of the actual software installed.
For example (here we are using a shared lun)
1. Run this command on a good ESXi host:
cp imgdb.tgz /vmfs/volumes/mylun/goodimgdb.tgz
2. Run the following commands on the affected ESXi host:
cp /vmfs/volumes/mylun/goodimgdb.tgz /bootbank/imgdb.tgz
cp /vmfs/volumes/mylun/goodimgdb.tgz /tmp/
cd /tmp
tar -xzf imgdb.tgz
cp -r /tmp/var/db* /var/db
/sbin/auto-backup.sh
3. Reboot the affected ESXi host.
4. Remediate the affected ESXi host.