He is...7-8 months? if this is new it could be a fear stage. I'd take a week off meeting strangers-any environment that sets him off as if it IS a fear phase, it will go away if you avoid the trigger.
Context is huge. It could be the leash (on leash VS off leash) it could be the environment (he is comfortable at home so more accepting). Maybe something scared him on a walk and now he is anxious (it may not even have been big enough for your to notice). Or it sounds like it is outdoor VS indoor.
If not you'll have to do some counter conditionning/desentization but i'd start with a 1-2 weeks break (even if it means no leash walks).