5. Given three points $A, B, C$ in a plane satisfying
$$
|\overrightarrow{A B}|=3,|\overrightarrow{B C}|=5,|\overrightarrow{C A}|=6 \text {. }
$$

Then the value of $\overrightarrow{A B} \cdot \overrightarrow{B C}+\overrightarrow{B C} \cdot \overrightarrow{C A}+\overrightarrow{C A} \cdot \overrightarrow{A B}$ is ( ).
5. C.

From the cosine theorem, we know
$$
\begin{array}{l}
\overrightarrow{A B} \cdot \overrightarrow{B C}=-\overrightarrow{B A} \cdot \overrightarrow{B C} \\
=-\frac{|\overrightarrow{B A}|^{2}+|\overrightarrow{B C}|^{2}-|\overrightarrow{A C}|^{2}}{2} .
\end{array}
$$

Similarly,
$$
\begin{array}{l}
\overrightarrow{B C} \cdot \overrightarrow{C A}=-\frac{|\overrightarrow{C A}|^{2}+|\overrightarrow{C B}|^{2}-|\overrightarrow{A B}|^{2}}{2}, \\
\overrightarrow{C A} \cdot \overrightarrow{A B}=-\frac{|\overrightarrow{A B}|^{2}+|\overrightarrow{A C}|^{2}-|\overrightarrow{B C}|^{2}}{2} .
\end{array}
$$

Therefore, $\overrightarrow{A B} \cdot \overrightarrow{B C}+\overrightarrow{B C} \cdot \overrightarrow{C A}+\overrightarrow{C A} \cdot \overrightarrow{A B}$
$$
=-\frac{|\overrightarrow{A B}|^{2}+|\overrightarrow{A C}|^{2}+|\overrightarrow{B C}|^{2}}{2}=-35 \text {. }
$$