You've got it! Yes, one (very new) theory is that the plague was so bad in Europe not because of rats but because of contaminated grain supplies that spread the disease. It's a little unclear how the grain supply became contaminated (like septic, like you're suggesting).