CD28+CD45RA− CD8dim Treg (OR = 0.019, p = 0.007) mediated the risk of Bacteroides A plebeius A (OR = 0.149, p = 0.036) on glioma, accounting for 2.99% of the effect; the proportion of CD4+ memory T cells in whole blood (OR = 0.066, p = 0.029) mediated the risk of Bacteroides sp002160055 (OR = 0.158, p = 0.024) on non‐glioblastoma(GBM), accounting for 8.51% of the effect, while the risk of Faecalicoccus (OR = 0.345, p = 0.005) on non‐GBM was jointly mediated by the absolute number of Naive CD8br and the expression of CD19 in IgD+ CD38br B cells. This evidence concerns the gene CD4 and central nervous system cancer.