The 28-year-old defender sustained the problem in the closing stages of the FA Cup semi-final win over Manchester City, ruling him out of a second FA Cup final.
He has now gone under the knife in order to repair the injury and will aim to return to training in October.
An Arsenal statement read: “Right hamstring injury sustained during Emirates FA Cup semi-final on July 18. Further assessments during the week identified a significant injury to the right hamstring.
Shkodran had a successful small procedure to his right hamstring on Saturday. He is aiming to return to full training in October.
🗞 Full update on @MustafiOfficial 👇
— Arsenal (@Arsenal) July 28, 2020
“As a result, Shkodran had a successful small procedure to his right hamstring on Saturday.
“Shkodran is now in the early stages of his recovery and rehabilitation, receiving specialist attention and support from our medical team.
“Aiming to return to full training in October.”
Mustafi has enjoyed something of a career renaissance at the Emirates Stadium since Mikel Arteta took charge in December.
Often a divisive figure among Arsenal supporters, Mustafi became an integral part of Arteta’s side – starting all-but two of their last 14 Premier League games prior to his injury.