Using the Green functions technique, we study the subgap spectrum of short three-dimensional superconductor--normal metal--superconductor junctions containing one or two point impurities in the normal layer. We find that a single nonmagnetic or magnetic defect induces two quasibound Shiba-like states. If the defect is located close to the junction edge, the energies of these states oscillate as functions of the distance between the impurity and the edge. In the case of two nonmagnetic impurities, there are generally four quasibound states (two per spin projection). Their energies oscillate as functions of the distance between the impurities, and reach their asymptotic values when this distance becomes much larger than the Fermi wavelength. The contributions of the impurities to the Josephson current, local density of states, and to the normal-state conductance of the junction are analyzed.