SRD:Backbiter Spear

Spear, Cursed Backbiter: This is a +2 shortspear, but each time it is used in melee against a foe and the attack roll is a natural 1, it damages its wielder instead of her intended target. When the curse takes effect, the spear curls around to strike its wielder in the back, automatically dealing the damage to the wielder. The curse even functions when the spear is hurled, and in such a case the damage to the hurler is doubled.

Moderate evocation; CL 10th; Craft Magic Arms and Armor, bestow curse; Price 7,500 gp.