It's legal to buy insurance covering civil liability for almost anything other than criminal acts. The price and availability of such insurance tends to vary in proportion to the risk, and policies often have specific exclusions to discourage risky behaviors. Directors and officers insurance is very common.