Venting with flame is a rather misleading euphenism. Venting occurs when a battery gets excessively hot and the internal gas pressure in the battery exceeds 10 bar (!). Venting is a safety feature to prevent a more consequential explosion.
Thermal runaway is a considerably more serious process resulting in fire or worse. A Li-ion battery is at risk of thermal runaway if it's temperature exceeds 150C. A typical cause is from metallic dust contamination during manufacturing causing an electrical short. But it could be caused by puncture, crushing, over-charging (charger fault) or a short-circuit. Thermal runaway pushes the temperature high enough to ignite lithium.
Lithium battery chemistry has an inherent potential for thermal runaway. The introduction of lithium-ion batteries was a significant improvement in safety over earlier lithium-metal batteries. Early lithium-ion batteries for instance would withstand a nail penetration. That safety margin has been eroded in recent years by the push for higher and higher energy densities. If you impaled a recent lithium-ion battery with a nail it would be a bomb.
Lithium-ion batteries still have a good safety record. A quality Li-ion battery has a failure rate better than 1:10,000,000. The ill-fated Samsung 7 recall was because their failure rate was approaching 1:200,000. Apple and Dell both recalled millions of Li-ion batteries before Samsung but Apple is apparently better at keeping molten laptops out of the news than Samsung.
I use lithium ion batteries, like everyone else. But I wouldn't allow a generic Li-ion battery or charger inside my home. Lithium fires are nasty.
Real-life video of thermal runaway
(Mobileread doesn't support youtube timestamps. Jump to 7:30 in video)