Shared metabolic pathways could allow simultaneous manipulation of T cells, viruses and tumours. Here the authors show targeting cholesterol esterification restrains hepatitis B in vitro, whilst bolstering exhausted antigen-specific T cell responses from human liver and hepatocellular carcinoma.