Well, I think it's pretty rare for someone to be harmed by old makeup, but I also think it's good to be sensible about what you put near your eyes or on your mouth. Infections on your face can be nasty business.
After hearing some stories from a friend who is a doctor, I now play it safe by tossing opened mascara after 3 months or so and the rest of my opened liquids, pastes, gels, and even powders after a year. Pencils get two years because the ends get renewed every time they are sharpened. The possibility of an infection just isn't worth it. I don't wear much makeup so the cost isn't really much of a consideration.
Unopened makeup is another story. Most of the information I've read seems to agree that products are so packed with preservatives (organic products may be different) that they can last quite nicely for 3-5 years if stored at a constant cool temperature away from sunlight. Changes in texture, color, and smell during that time are a sign that the product is decomposing usually because of improper storage. After that time decomposition starts to set in regardless of storage but the timeline obviously varies depending on the product formulation.