The 42-year-old man was walking along Duke of York Avenue, Wakefield at around 3am on Wednesday, December 2.
He was walking to a friend’s house and was approached from behind by two men who threatened and attacked him.
During the attack one of the men then pulled out a knife and stabbed him to the lower body.
While the attack was taking place, the victim’s friend saw what was happening and came out to help.
He was also injured after grabbing hold of the knife.
The two attackers, who detectives said may have been with a woman, then ran off.
Det Insp Tim Hunt, of Wakefield CID, said: “Clearly this was a serious incident and the consequences could have been even worse given a knife was produced and used to injure the victim to his lower body.
“The two suspects were described as white males wearing hoods and I would like to speak to anyone who saw these men, possibly accompanied by a female, hanging around the Duke of York Avenue area shortly before the offence took place.”
Both victims were treated for their injuries at Pinderfields Hospital.
Anyone with any information should contact Wakefield CID on 101 or Crimestoppers, anonymously, on 0800 555111.