  The significant attenuation of the cosmic-ray flux above $\sim 5 10^{19}$ eV
suggests that the observed high-energy spectrum is shaped by the so-called GZK
effect. This interaction of ultra-high-energy cosmic rays (UHECRs) with the
ambient radiation fields also affects their composition. We review the effect
of photo-dissociation interactions on different nuclear species and analyze the
phenomenology of secondary proton production as a function of energy. We show
that, by itself, the UHECR spectrum does not constrain the cosmic-ray
composition at their extragalactic sources. While the propagated composition
(i.e., as observed at Earth) cannot contain significant amounts of intermediate
mass nuclei (say between He and Si), whatever the source composition, and while
it is vastly proton-dominated when protons are able to reach energies above
$10^{20}$ eV at the source, we show that the propagated composition can be
dominated by Fe and sub-Fe nuclei at the highest energies, either if the
sources are very strongly enriched in Fe nuclei (a rather improbable
situation), or if the accelerated protons have a maximum energy of a few
$10^{19}$ eV at the sources. We also show that in the latter cases, the
expected flux above $3 10^{20}$ eV is very much reduced compared to the case
when protons dominate in this energy range, both at the sources and at Earth.
