Virus writer Sven Jaschan has been found guilty of computer sabotage and illegally altering data after releasing the Sasser worm in May 2004.
The court in Verden, in the north west of Germany, gave the teenager a suspended sentence of one year and nine months.
Jaschan was caught following a tip-off to police after Microsoft offered a $250,000 reward for information leading to the conviction of the worm's creator.
"Sven Jaschan avoided a jail sentence by the skin of his teeth because he was arrested within days of his 18th birthday. He was lucky that the police caught him when they did," said Graham Cluley, senior technology consultant at Sophos.
"Nevertheless, his name will always be associated with some of the biggest viruses in the history of the internet."
Cluley added that a Sophos survey of almost 1,000 people last month found that 66 per cent believed that a jail sentence is the most appropriate punishment for writing a virus.
Jaschan has told officials that his original intention was to create a virus that would combat the Mydoom and Bagle viruses and remove them from infected computers. This led him to develop the Netsky virus further, and to modify it to create Sasser.
The worm was released in May 2004 and spread round the world with unprecedented speed, accounting for 70 per cent of all infections during the first half of 2004.
RTX 280 Ti will come with 11GB of fast GDDR6 video RAM with a 352-bit memory bus offering 616Gbps
The scale of jobs lost to automation will be at least as large as those in the first three industrial revolutions
Latest Tesla news: Tesla stock price tanks amid reports of 'widening probe' by SEC and claims the base Model 3 loses money
SEC 'probe' takes its toll on Tesla as new research suggests that Tesla loses $6,000 on every $35,000 Model 3
10nm Cannon Lake Core i3-8121U CPUs make a rare outing with Intel's NUC mini PC