The vent pipe normally has a piece of flashing that seals out water. The flashing consists of flat metal, the top part going under the shingles, the bottom over the top of shingls. In the center the metal bulges upward and a rubber boot fits securely around the vent pipe. This rubber boot is prone to fail due to UV deterioration. The fix is to replace the flashing. Usually you can simply add flashing on top of an existing one, but you will have to judge when you get up there.