Corticosteroids are powerful anti-inflammatory medications. They suppress inflammation and pain, and they also suppress the immune system. If the immune system is weakened in any way, it can put you at increased risk for infections. A possible complication of any joint replacement surgery is infection. While this occurs only rarely, the risk is increased if the immune system is impaired. For this reason, people should wait to have joint replacement surgery after having a steroid injection until the immune system has had time to recover.