Good chance it's a genuine charger. Had the same problem a couple of years ago after buying a brand new iPad, the charger exploded in the middle of the night. After returning it to the Apple shop it turned out to be a software fault and easily fixed. Fortunately there was no lasting damage.