The two people were not involved in Ford's care, said Sally Szuster, the senior manager of communications and public affairs, in a statement.
Hospital staff investigated the incident after becoming aware of a security breach and "appropriate action has been taken," she said. Szuster did not elaborate on what the action included.
Ford is aware of the breach of privacy.
"We sincerely regret that these privacy breaches occurred," said Szuster. "Privacy for all of our patients is paramount and we will continue to be diligent in upholding our privacy policies and practices."
Ford, 45, was diagnosed with liposarcoma, a rare type of cancer, in September after a tumour was discovered in his abdomen. The mayor has undergone two rounds of chemotherapy.
On Tuesday, Ford cast a ballot in the mayoral election in support of his brother Doug Ford.
Rob Ford was initially running for re-election in Toronto's mayoral race, but withdrew his name from contention shortly after falling ill. The elder Ford brother entered the race just before the nomination deadline.
Rob Ford is now running as a candidate for Ward 2 councillor. He represented the ward for a decade before he was elected as mayor in 2010.
Advance voting in this year's mayoral election started Tuesday. Election day is Oct. 27.Suggest a correction