A 30-year-old mother was taken to hospital after being repeatedly stabbed with scissors by a stranger while protecting her 10-year-old son during a random attack in Melbourne's CBD on Tuesday afternoon, according to Victoria police.

The alleged attacker, 27, was arrested at the scene after being restrained by three bystanders, police said. The mother was walking along Spencer Street with her three children when the man allegedly punched the child and then continued walking. He then turned around, grabbed the mother in a headlock, and stabbed her repeatedly in the back and left shoulder.

The incident occurred just outside the Melbourne West police station, allowing officers to attend within a minute. Superintendent Zorka Dunstan, one of the responding officers, said she was 'horrified' by the attack. She saw the incident from her office and came down to find an 11-year-old boy crying, whom she hugged and comforted.

The mother was taken to Royal Melbourne Hospital with non-life-threatening injuries and is in a stable condition. Her 10-year-old son was also taken to hospital as a precaution. The other two children were not injured.

Police confirmed the man was known to authorities in New South Wales and Western Australia for family violence and assault charges, and was not on bail at the time. They said there was no apparent motivation and suspected a mental health episode.

The alleged attacker has been deemed not fit for interview and remains in police custody. Dunstan described the bystanders' actions as 'heroic', saying she told the 10-year-old boy how lucky he was that good people intervened to help his mother. 'Without their intervention, it could have been a lot worse,' she said.