  Powerful radio-loud active galactic nuclei (AGN) with large Mpc-scale jets
have been theoretically motivated as emitters of high-energy cosmic rays.
Recent radio observations have established a populous class of young radio-loud
galaxies with compact ($< 1$ kpc) symmetric jets that are morphologically
similar to large-scale AGNs. We show that these compact AGNs, so-called compact
symmetric objects (CSOs), can accelerate protons up to $10^{20}$ eV at their
hot spots via a Fermi type mechanism on the assumption of efficient
acceleration. The required magnetic field strengths are comparable to those
derived from the minimum energy condition. We further show that the accelerated
protons can escape through the photon fields of the cocoon without significant
energy loss. However, the local number density of powerful CSOs is insufficient
for CSOs to power the entire observed flux of ultra-high-energy cosmic rays,
providing maximally only a few percent. A heavy composition of UHECRs allows
more CSOs to accelerate particles to UHECR energies, but escaping the cocoon is
difficult. We comment on a method that may test CSOs as UHECR sources.
