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 carriage 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.”
You may also be interested in:
Derek Monnery, chairman of the Essex Rail Users Federation, said it was an unusual incident and it may have been down to recent refurbishment work on Greater Anglia’s rolling stock.
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.”
Greater Anglia confirmed the carriage was one of those which had been refurbished but said it was unable to say if this had been a factor in the incident until its investigation had been completed.
The operator has unveiled a £1.4bn plan to replace its trains.