Gallstones themselves are not cancerous, but their presence can increase the risk of certain types of cancer. Chronic inflammation caused by gallstones can lead to the development of gallbladder cancer. Additionally, gallstones may be associated with an increased risk of bile duct cancer, known as cholangiocarcinoma.