Obesity can be responsible for almost 4% of cancers. Researchers concluded that excess body weight (not just its complications) accounted for 3.9% of all cancers WORLDWIDE in 2012. The report also states that policies, economic factors, and marketing practices that promote high total energy intake combined with insufficient physical activity levels will most certainly increase rates of obesity AND cancer for decades to come.
Source - CA: A Cancer Journal for Clinicians in 2018.