He said the breaches occurred in January, February and March, and were detected by an internal monitoring system.
The state department would not release the names of the contractors involved, or the names of the two companies they worked for.
Bill Burton, a spokesman for Obama's presidential campaign, called for a complete investigation.
He said: "This is an outrageous breach of security and privacy, even from an administration that has shown little regard for either over the last eight years. Our government's duty is to protect the private information of the American people, not use it for political purposes.
"This is a serious matter that merits a complete investigation, and we demand to know who looked at Senator Obama's passport file, for what purpose and why it took so long for them to reveal this security breach."
Joseph Biden, a Democratic senator, said the breach of Obama's passport information left him "deeply troubled," and urged Condoleezza Rice, the secretary of state, "to promptly refer this matter to the state department inspector general for investigation".
McCormack said Rice "had a lot of questions about the system ... and she wanted to make sure we did a full investigation of the matter".
In another development, Bill Richardson, the governor of New Mexico, endorsed on Friday Obama's campaign, calling him a "once-in-a-lifetime leader" who can restore America's international image.
As a Democratic superdelegate, the former presidential hopeful plays a part in the tight race for nominating votes and could bring other superdelegates to Obama's side. He also has been mentioned as a potential running mate for Obama.