Technically, although without meaning to, Ronald Weasley cast a slug vomiting curse on himself.
Ron plunged his hand into his robes, pulled out his wand, yelling, “You’ll pay for that one, Malfoy!” and pointed it furiously under Flint’s arm at Malfoys face.
A loud bang echoed around the stadium and a jet of green light shot out of the wrong end of Ron’s wand, hitting him in the stomach and sending him reeling backward onto the grass.
Presumably as long as the spell is performed correctly the spell will act correctly no matter what way the wand is pointing. In this case the magic happened to shoot out the wrong end of the wand.
Near enough the same thing happened to Lockhart when he tried to Obliviate Harry and Ron in the Chamber
He raised Ron’s Spellotaped wand high over his head and yelled, “Obliviate!”
The wand exploded with the force of a small bomb.
I think under normal circumstances the problem would be performing the spell properly whilst pointing the wand at yourself.