Have you contacted a trainer for an evaluation? It could be a fluke or something got triggered. Either way, I would defer to a professional who can see the dog in person.
GSD's are bred to be protective, it's in their nature, so most cannot be expected to be lab like where they're happy go lucky with anyone that wants to approach them. Socialization helps expose a dog to a myriad of things and also teach appropriate behaviour, obedience is important as well
Jasmine - Female Miniature Poodle - born Aug 15, 2010
Loker Delgado Von Stalworth - Male GSD - born Jan 26, 2012
Koda & Zazu - 5 year old male cats
Alex - Male Cocker Spaniel (rescue) - RIP Cuddlebug 2007-2010