We develop a theory of the critical current in superconductor–ferromagnetic alloy–superconductor trilayers, which takes into account the strong spin dependence of electron scattering on compositional disorder in a diluted ferromagnetic alloy. We show that in such a system the critical current oscillations as a function of the thickness of the ferromagnetic layer, with period of vF/2I, vF and I being the Fermi velocity and exchange splitting, respectively, decay exponentially with a characteristic length of the order of the mean free path.