The TP53 gene fulfills a central role in protecting cells from genetic insult. Given this crucial role it might be surprising that p53 itself is not essential for cell survival. Indeed, TP53 is the single most mutated gene across different cancer types. Thus, both a theoretical and a question of significant practical applicability arise: can cells be programmed to make TP53 an essential gene? Here we present a genetic p53 sensor, in which the loss of p53 is coupled to the rise of HSV-TK expression. We show that the sensor can distinguish both p53 knockout and cells expressing a common TP53 cancer mutation from otherwise isogenic TP53 wild-type cells. Importantly, the system is sensitive enough to specifically target TP53 loss-of-function cells with the HSV-TK pro-drug Ganciclovir both in vitro and in vivo. Our work opens new ways to programming cell intrinsic transformation protection systems that rely on endogenous components.