4. Find all real solutions \((x, y, z)\) of the system of equations
$$
\left\{\begin{array}{l}
3\left(x^{2}+y^{2}+z^{2}\right)=1, \\
x^{2} y^{2}+y^{2} z^{2}+z^{2} x^{2}=x y z(x+y+z)^{2}
\end{array}\right.
$$
4. From the second equation of the original system, if one of $x, y, z$ is 0, then exactly two of them are 0, and from the first equation, the other one is $\pm \frac{\sqrt{3}}{3}$, thus we get the solutions $(x, y, z)=\left(0,0, \pm \frac{\sqrt{3}}{3}\right),\left(0, \pm \frac{\sqrt{3}}{3}, 0\right),\left( \pm \frac{\sqrt{3}}{3}, 0,0\right)$.

Next, assume $x, y, z$ are all non-zero. Then from the second equation, we know $x+y+z \neq 0$. It is well-known that $(x+y+z)^{2} \leqslant 3\left(x^{2}+y^{2}+z^{2}\right)=1, x^{2} y^{2}+y^{2} z^{2} \geqslant 2 y^{2}|x z|, y^{2} z^{2}+z^{2} x^{2} \geqslant 2 z^{2}|x y|, z^{2} x^{2}+x^{2} y^{2} \geqslant 2 x^{2}|y z|$. Therefore, $x^{2} y^{2}+y^{2} z^{2}+z^{2} x^{2} \geqslant x^{2}|y z|+y^{2}|z x|+z^{2}|x y| \geqslant|x y z(x+y+z)| \geqslant\left|x y z(x+y+z)^{3}\right|$. Since $(x, y, z)$ is a solution to the original system, the above inequalities all hold as equalities, thus $x=y=z$. Hence, the solutions are $(x, y, z)=\left(\frac{1}{3}, \frac{1}{3}, \frac{1}{3}\right),\left(-\frac{1}{3},-\frac{1}{3},-\frac{1}{3}\right)$.

Therefore, all real solutions to the original system are $(x, y, z)=\left(0,0, \pm \frac{\sqrt{3}}{3}\right),\left(0, \pm \frac{\sqrt{3}}{3}, 0\right),\left( \pm \frac{\sqrt{3}}{3}, 0,0\right)$, $\left(\frac{1}{3}, \frac{1}{3}, \frac{1}{3}\right),\left(-\frac{1}{3},-\frac{1}{3},-\frac{1}{3}\right)$.