Robbie Lowther stabbed Morbheinn McTavish in the stomach leaving her with a liver injury.
Lowther, 23, from Tayport, admitted assaulting her to her severe injury, permanent disfigurement and to the danger of her life.
It happened on 2 January 2015 in Tayport's Craig Road.
Sentence was deferred on Lowther for the preparation of a background report and risk assessment until next month. He was remanded in custody.
A judge told him at the High Court in Edinburgh that he found the circumstances of the crime "extremely disturbing".
Lord Uist said: "You are a man with two previous convictions for carrying a knife or bladed weapon. You were in possession of a knife or bladed weapon on the night in question."
"You used it to stab a woman who was a complete stranger to you for no apparent reason," said the judge.
Advocate depute Jim Keegan QC said it could be seen from a victim impact statement that the attack has had "a substantial adverse effect on her active life".
The victim had gone for a drink with a friend to the Tayport Arms and met up with others. Lowther was also in the bar.
Lowther had been freed from his last prison sentence a fortnight earlier.
Ms McTavish and her friend decided to leave the bar about midnight, but as they walked through streets in Tayport her friend realised she had forgotten her jacket and decided to return to the pub to get it.
Ms McTavish continued walking along Craig Road and heard a male voice say: "Excuse me, have you got the time?"
She turned to face Lowther and told him she did not. She turned away to cross the road when she felt sudden pain and saw an arm over her left shoulder. Lowther then ran off.
Mr Keegan said: "It appears that the victim was selected at random by the accused and stabbed by him. He attacked her after her friend had left when she was alone. He stabbed her in the midriff. He clearly intended to do her serious harm."
Defence solicitor advocate Iain Paterson said: "He was out drinking that day and apparently drank a considerable amount of alcohol and also took some drugs."
A newly-freed convict stabbed a woman in a random knife attack in Fife after telling a pub customer he was "just out, but not for long".