Cancer associated fibroblasts are an important and highly heterogeneous component of the tumor microenvironment. Here the authors identify PRRX1 as a master transcription factor determining a fibroblast lineage with myofibroblastic phenotype, associated with unfavourable prognosis in several cancer types.