If the water is coming from the cap, and no sign of water on the outside of the pipe, I still think it is condensation. Temperatures vary from your basement and the attic. Vent pipes have fumes and moisture in them. I am guessing the pipe is a vent for future use. It may have enough condensation in it to force water out of a bad glue job. being a vent (if it truly is) the installer probably didn't consider any water would collect and was just trying to stop sewer gas from entering the house.