Most tents these days claim to have a "fireproof" coating - but I'd never really want to put this to the test! I have heard one horror story in particular (admittedly with a much older tent) that's made me wary enough to recommend never cooking inside.
The likelihood may be low (and that's not to say it is) but if it does go up in flames and you're inside it then you've lost all escape routes and you're surrounded by smoke and burning material - IMHO it's just not a risk worth taking. And yes, other dangers like carbon monoxide poisoning are definitely possible, likely if it's in an enclosed space.