Once the wort has fermented, no harmful pathogens (germs) can grow in beer - an old beer may degrade and become stale, but it's never harmful to drink. Historically, beer was brewed in part to avoid drinking contaminated water.
There are many references on the net - just a quick search brings up this:
Beer is certainly not hospitable for the growth of microorganisms. You
know, we don’t have coli scares in beer. Pathogens will not grow in
beer and the beer—of course during production it's boiled—beer
contains hops which has got antimicrobial components, and so, you
know, ales and beers over the years have been safer to drink rather
than the water because of these reasons. You know, the early settlers
in this country, you know, the story is told of those guys landing up
from the rocks. Why? Because of victuals were much spent especially of
beer, and, you know, the people, they kept enough beer for the sailors
to go back on the Mayflower. The people who were settling there were
drinking the local water, and they were getting sick because, you
know, if they’ve [they'd] been drinking the ale, and they would've
been much healthier.
from, you know, Beer Science, Scientific American