Letrozole is used as a treatment for breast cancer, but is on the banned list due to its qualities as a masking agent and has also been known to be used by bodybuilders to increase lean muscle mass.
An ITF statement said Errani was charged with an anti-doping violation on April 18 and had promptly asked for a hearing before an Independent Tribunal.
She has also been retroactively disqualified from events that took place from February 16 through June 7.
The former world No5 Sara Errani has been banned for two months after failing a doping test.
According to The Times, Errani was staying at her mother's house when she failed the test. The circumstances are unusual as Errani tested positive for letrozole, a drug her mother was using to treat breast cancer.
An adjudication panel ruled that Errani's fault was "at the lower end of the scale", but that she should still be banned for two months from August 3.
Errani reached the singles final at the French Open in 2012, losing to Russian Maria Sharapova 6-3, 6-2.
The Italian argued that some of the letrozole pills, which were kept in the kitchen might have contaminated foods which she had consumed.
"I never took, in my life and during my career, any prohibited substance", the five-time major doubles champion said in a statement.
Some will question why she was allowed to play for nearly four months in between those dates without undergoing another test, despite a busy period in which she played in 10 tournaments and enjoyed a successful run through qualifying at the French Open.
"The only viable option has been that an accidental food contamination occurred".
"She explained how in the past she had accidentally dropped pills from the blister pack from which Femara was discharged by hand onto the worktop or onto the floor", a record of the hearing said.
"I feel extremely frustrated, but I'm at peace with my conscience", she wrote on Twitter.
The written reasons for the verdict revealed Errani had been visiting her mother prior to the date of her positive test on February 16.