A 25-year-old and a 28-year-old were arrested by detectives this morning (Sunday) on suspicion of assault.
A police spokesman confirmed both men have been released on police bail pending further enquiries tonight.
The victim, a 67-year-old woman, was working in the kitchen area of The Beeches care home, on Ferrybridge Road, at around 6.15am on Saturday when she heard a sound at the back door.
She opened it and was confronted by a man who forced his way in and punched her before stabbing her in the arm with a penknife.
The care worker was taken to hospital with non-life threatening injuries.
Police said the attack at The Beeches was being linked to a similar incident at a nearby care home, where, about 20 minutes earlier, a member of staff confronted two men at the property.
Supt Karen Gayles, of Wakefield CID, said: “Due to both properties being care homes and their vicinity to one another, we are linking these incidents. It is particularly concerning that these men appear to be targeting the homes of elderly and vulnerable people and their motives for doing this are currently unclear.
“We are treating these incidents extremely seriously. We have put on additional patrols in the area and are working tirelessly to identify these two men.
“Our officers have been making other residential homes in the area aware of these incidents and we would ask people to be vigilant and report any suspicious behaviour to us.
“Anyone who believes they have seen these suspects or who has any information about their identities is asked to call Wakefield District CID on 101 or Crimestoppers anonymously on 0800 555 111.
“In an emergency situation please call 999.”