Cosmic rays classification This engineering handbook illustration shows cosmic rays as part of the electromagnetic spectrum.

But cosmic rays are particles, not electromagnetic rays, right?  That seems like a huge error!  Could they be referring to gamma ray bursts?
 A: "Cosmic rays" can be any energetic quanta (including photons) that impinge on the atmosphere, coming from deep space—as opposed to, say, the sun.  When they are observed at the surface of the Earth, we distinguish the original quanta that traveled across interstellar space as "primary cosmic rays," versus "secondary cosmic rays" that are produced through the collision of the primaries with the atmosphere.  So a primary cosmic ray can produce a cascade of secondary cosmic rays descending toward the surface—an "air shower."
The most energetic primary cosmic rays are hadronic, some mixture of protons and highly stable nuclei like $^{4}$He and $^{56}$Fe.  The spectrum of cosmic ray protons extends up about $10^{20}$ eV; beyond this energy scale (the GZK cutoff), the protons interact too strongly with the cosmic microwave background to travel over the Mpc distances between the active galactic nuclei where they originate and telescopes on Earth.  However, there is also a high-energy photon component to among primary cosmic rays, and those are the most energetic (or shortest wavelength) photons that have ever been observed, with energies up to about $10^{14}$ eV.  These are what charts like that of the electromagnetic spectrum mean by "cosmic rays."
However, this depiction of $\gamma$-rays and cosmic rays as being distinct regions of the spectrum is also potentially misleading.  In practice, astronomers and astrophysicists normally refer to these as "TeV $\gamma$-rays."  It might seem desirable to have a different name for these photons (which are mostly produced through inverse Compton upscattering, $e+\gamma\rightarrow e+\gamma$, of radio and infrared photons by ultrarelativistic electrons and positrons), versus $\gamma$-rays that are produced in nuclear processes; this would be analogous to the way that a 10 keV photon could be an x-ray if it were produce in a high-energy electronic transition, or a $\gamma$-ray if it came from a low-energy nuclear transition.  However, in actual parlance, there is no distinction between photons produced in nuclear physics and in particle physics; they are all $\gamma$-rays, no matter how high their energies.
