Our analysis identifies the TNF pathway as a crucial mediator in the interplay between BC and diabetes. Here, TNF is linked to breast cancer.