A door on a passenger train was open for 23 minutes while the vehicle travelled at 80mph (128km/h).
A passenger reported it to the driver at Hockley station, in Essex, at 07:20 BST on the Liverpool Street to Southend line on 22 August, the Rail Accident Investigation Branch (RAIB) said.
The train travelled in traffic for 16 miles (26km) with the door open.
Train operator Greater Anglia said the train had immediately been taken out of service.
The RAIB has conducted an investigation and will release a “safety digest” at a later date.
Martin Moran, Greater Anglia commercial and customer service director, said: “Safety is our highest priority. We immediately took the train out of service when this happened and carried out our own investigation into the incident. We have also carried out checks on every single door on that type of train that we have.
“No-one was injured in this incident and there have been no further incidents since.”
A witness who was not on the train, who wished to remain anonymous, said he had seen Greater Anglia staff shouting and a technician working on the door.
He said: “All of a sudden there was a technician there looking at the door at the side. It must have been loose because they were able to slide it back.”
Derek Monnery, chairman of the Essex Rail Users Federation, said it was an unusual incident and should not have happened.
He said: “It could be a dangerous situation if the train is crowded and a lot of people are standing there, which fortunately it doesn’t sound like it was in this case.
“It should never have happened.”