Is a homeowner liable for an injury suffered by an employee of an uninsured contractor?

A homeowner hires a contractor to paint the interior of their home. The employment agreement states the contractor is to provide worker’s compensation insurance if they hire employees for the project.