These results suggest that CFP can serve as a prognostic biomarker for determining prognosis and immune infiltration in STAD and LUAD. Here, CFP is linked to gastric adenocarcinoma.