It is not dangerous insofar as carbon monoxide poisoning is concerned if your ENGINE IS OFF and you sleep in your car with the windows closed. Unless you have a very old and leaky engine/high emissions car, in which case the window seals are probably shot, too.