Actually, according Apple, the purplish colored flare, spot, etc is not exclusive problem of iPhone 5, yet it's on every generation of iPhone. That issues comes out when a light sources interact with camera at a certain angle. And the explanation is confirmed by Jim Fisher from PC Magazine.
To make the story short, the purple flare issue is related to reflection off the surface in the camera module and onto its sensor.
And to deal with the problem, Apple put a solution on the table, however the solution is considered disappointing and not too convenient for most of the users. Here is what Apple suggesting to fix the iPhone 5 camera's purple flare.
"Moving the camera slightly to change the position at which the bright light is entering the lens, or shielding the lens with your hand, should minimize or eliminate the effect,".So basically you are told to holding your phone camera differently. This solution reminds us of nearly similar issue related to antenna flap on 2010. At that time, Steve Jobs suggested users to hold their iPhone differently.
Use an iOS app instead to solve the purple flare issue on iPhone 5.
You can also utilize an iPhone app called Camera Fix to get rid off the bright purple flare problem. And this app is advertised to fix the purple-fringed issue on pictures or photos taken from that Apple's latest smartphone.
So no need to go to hard road in order to fix the camera purple flare issue, simply download the app, and let it do the job you expect it will do for you.
Because the disturbing situation can be removed without fuss, and here is what the developer says about its app.
Some shots on the iPhone have a problem of chromatic aberration which alters photos displaying a blue-violet halo. This app contains a filter, depurple, which eliminates this problem with a few simple tap.
This app will then use what it's called de-purple feature to discard the Purple Flare appears on pictures you take using iPhone 5. Aside fixing the problem this handy app also bring other features like harper, auto white-balance and vibrance.
You can grab this app via iTunes for $0.99.