  Let $\Gamma$ be an irreducible lattice in a product of two locally compact
groups and assume that $\Gamma$ is densely embedded in a profinite group $K$.
We give necessary conditions which imply that the left translation action
$\Gamma\curvearrowright K$ is "virtually" cocycle superrigid: any cocycle
$w:\Gamma\times K\rightarrow\Delta$ with values in a countable group $\Delta$
is cohomologous to a cocycle which factors through the map $\Gamma\times
K\rightarrow\Gamma\times K_0$, for some finite quotient group $K_0$ of $K$. As
a corollary, we deduce that any ergodic profinite action of
$\Gamma=\text{SL}_2(\mathbb Z[S^{-1}])$ is virtually cocycle superrigid and
virtually W$^*$-superrigid, for any finite nonempty set of primes $S$.
