That is a bad sore, I would say a rodent bite but I am sure you would know that if you had live rodents left in the cage. It could be a burn if it did accidently brush against an explosed bulb. Any sharp points (rocks, logs etc) in the cage he may have rubbed against?
If none of the above, any crickets in the cage? Crickets can do alot of damage if left in a cage without any other food source other than the snake. Seen similar wounds on bearded dragons but it would be weird if there are crickets in the snake cage since corns don't eat crickets.
Ulcers could be it too, or a really nasty mite bite that has been rubbed raw by the snake. But again mites would be noticeable if looked for. Vet check may be the only solution.