Stab back at it.
From Create Your Own Story
As it lunges, it opens its mouth in an attempt to bite. You stab it in the open mouth quickly. It bleeds and charges for you. You quickly leap to the side and the spider crashes headfirst into the wall. Afterwards, you chop through the cobwebs in the forward corridor and you find two weak wooden doors.