  Up to date, there is no consensus regarding the origin of ultra-high energy
cosmic rays (UHECR) beyond the Greisen--Zatsepin--Kuzmin (GZK) limit. In order
for these UHECRs to reach the Earth, an extremely suppressed interaction
between them and the cosmic microwave background (CMB) is required, which is
impossible for standard model (SM) particles, except neutrinos. In this letter,
we present constraints on the parameter space of models involving axion-like
particles and dark photons, as candidates for UHECRs, by assuming that these
particles can traverse the visible Universe without decaying. In the case of
axion-like particles, the constraints are tighter than those given in previous
works. We present for the first time constraints on the parameter space of dark
photon models, by considering their kinetic term mixing with SM photons.
