Karna asked the brahmin-warrior Parashurama to teach him the Brahmastra weapon.
"I suspect you're a kshatriya," said Parashurama.
"No!" Karna lied. "I'm no kshatriya!"
So Karna became Parashurama's disciple.
One day Parashurama fell asleep, his head resting on Karna's lap. An enormous centipede bit Karna's thigh and sucked his blood. Karna said nothing, not wanting to wake his guru.
When Parashurama awoke and found himself covered with blood, he shouted, "Only a kshatriya would bear such pain in silence. For your deceit, I curse you: when you want to use the Brahmastra, the sacred mantra will slip from your mind."