A teenager in Edinburgh had admitted the racially aggravated attempted murder of a Syrian refugee whom he repeatedly stabbed in the chest and stomach.

Sean Gorman, 18, pleaded guilty to attacking Shabaz Ali, 25, a Syrian asylum seeker, after an argument about noise levels in a privately owned homeless hostel in central Edinburgh in early May.

Ali needed extensive treatment in intensive care after the attack, which only came to light when his father, Sivan Ali, notified the media that his son had been critically wounded in a racist attack.

Police Scotland failed to issue a press notice about the assault until several days later, even though Gorman, who was detained nearby a short time later carrying a lock knife, had been arrested, charged and taken to court the next morning.

The incident took place at a ground-floor hostel used by Edinburgh council near the Tollcross area of the city. It is thought Ali intervened in a row involving his female cousin, who was also based at the hostel, and a group of people including Gorman, who was then 17.

Gorman also pleaded guilty to the racially aggravated alarm of a woman, thought to be Ali’s cousin. Ali’s father claimed he could hear his son’s attackers shout: “Why are you still here? Why are you not back in your own country?”

The family came from Kobani, northern Syria, and had been living in Scotland for five years. At the time of the attack, Ali was working as a barber in Portobello and staying in a hostel as he looked for a new home.

A short police statement issued the following weekend failed to mention that the attack had been racially aggravated or that it took place in a secure building, covered by CCTV cameras.

Campaigners with Positive Action in Housing (PAIH), a Glasgow-based charity that initiated a fundraising campaign for the family, said at the time of the attack it had heard numerous reports of refugee families in Midlothian near Edinburgh suffering racist abuse and stone-throwing incidents, and in other parts of Scotland.

Ali had also complained to the council he did not feel safe at the hostel, PAIH added, because of security concerns.

The charity accused the council of failing to provide clean and appropriate alternative accommodation for Ali while he was recovering in hospital. Adam McVey, the council leader, said the authorities were doing all they could to support the family.

Aamer Anwar, the Ali family’s lawyer, said there needed to be an urgent review of the housing offered to refugees in Scotland. He said many were too afraid to report the racist abuse they received.

“Many refugee families today are suffering racist abuse in Scotland and it’s up to decent people to stand up for their rights and ensure that the culprits are dealt with and that the local authorities act sensitively to support and if necessary rehouse victims. What the authorities cannot do is hide and pretend this is not happening,” Anwar said after Gorman’s court appearance.

Speaking after a short hearing at the high court in Edinburgh, DCI Paul Grainger said: “Gorman’s violence was extreme and left the victim with significant, life-threatening injuries. He showed utter disregard for the victim and another woman who was with him – made all the worse given the appalling racist language used.”

Gorman is due to be sentenced on 17 August, pending social inquiry reports.