A six-year-old girl and a 38-year-old man have been hospitalised following an attack from a neighbour's dog on a quiet suburban street in Sydney's west.

The dog attacked the little girl on the driveway of a home on Nurragi Street, Villawood, about 10am this morning.

A neighbour then rushed in help, attempting to put the dog away before suffering a bite wound to his arm in the ordeal.

The dog was collected by council rangers after the attack. (Nine)

A six-year-old and a 38-year-old were both hospitalised from the attack. (Nine)

The girl was taken to the Children's Hospital at Westmead for minor lacerations to her legs. She will need skin grafts, but is lucky to survive.

"It's very fortunate that [the attack] didn't reach that catastrophic stage," a NSW Ambulance spokesperson told 9News.

The man was taken to Liverpool Hospital for treatment for his arm wound.

Police from Bankstown Area Command are now conducting inquiries.