Recently demonstrated isolated attosecond XFEL pulses should allow the probing of ultrafast electron dynamics at X-ray wavelengths. The authors use ghost imaging to enable high-resolution transient absorption spectroscopy at fluctuating XFEL sources.