Let \(k,r\geqslant 2\) and \(\ell \geqslant 3\) be integers, and let \(\tau _k(n)\) denote the k-th divisor function. In this paper, we apply the Hardy–Littlewood circle method to obtain an asymptotic formula for the sum \(\begin{aligned} \sum _{1\leqslant p_1,p_2,\ldots ,p_{\ell }\leqslant X}\tau _k(p_1^{r}+p_2^{r}+\cdots +p_{\ell }^{r}), \end{aligned}\) where \(p_1,p_2,\ldots ,p_{\ell }\) are prime variables. Previously only special cases are studied.