Owen Tappin, of Parkwood Road, in Beeston, Leeds, was 16 when he attacked the teenager as she walked her dogs in a park last year, dragging her into bushes, where she suffered an hour-long sex attack at his hands.
Tappin, now 17, a boy Scout who was intoxicated after drinking alcohol at a party in a church hall, was taken to the police by his own father the next day after inquiries into the attack became known and he confessed.
He was sentenced to indefinite detention for public protection (DPP) at Leeds Crown Court on January 18 this year, after pleading guilty to two counts of rape.
Trial judge Judge Geoffrey Marson QC had imposed an indeterminate period in detention after concluding the teenager had "an alternative and dark side" and had subjected his victim to a persistent and degrading assault.
And while he acknowledged there was nothing similar in his background and documents which suggested he was not a continuing risk, another report indicated he had twisted views about women.
He told the boy he had to serve a minimum of three years but would only be released when the Parole Board was satisfied he was no longer a danger.
Yesterday Lord Justice Aikens, Mr Justice Griffith Williams and Judge Nicholas Cooke QC, sitting at London's Criminal Appeal Court, quashed the open-ended sentence, saying it was excessive.
His trial had heard that several bypassers witnessed the initial stages of the attack after 11.30pm on May 9 last year and called out to Tappin and his victim but ultimately took no action, thinking they were a couple having a row.
Tappin had then marched the girl, who was a stranger to him, to a more secluded area where he raped her, slapping her face when she would not do as he wished.
He also subjected her to other sexual indignities and squeezed her throat when she objected. At one point he vomited because of the alcohol he had drunk, but then carried on.
Allowing his appeal, Lord Justice Aikens said: "The assessment of dangerousness was entirely appropriate.
"The sentencing judge was entitled to reach the conclusion that there was a significant risk that this appellant would commit further specified offences which would result in serious harm.
"He subjected his victim to a sustained sexual assault. He was in no way deterred by the presence of people nearby or the intervention of others. The dangerousness criteria are clearly satisfied in this case.
"However we have concluded in this case that the appropriate sentence is an extended sentence. His age and lack of previous convictions are important considerations," the judge concluded.
The DPP was replaced with an extended sentence, comprising six years detention, plus an eight-year period of extended licence in the community.