Mine did this too when I repurposed it. I fixed it by wrapping a couple of layers of teflon pipe thread tape around the neck/shoulder of the CO2 cartridge. This seemed to make it seal better against the rubber washer thing around the needle.
It seems to be a bit of a trick to find cartridges that are the exact right shape to seal properly on their own. The ones I got seemed to have a bit more of a taper than the one it came with, so the needle would pierce the cartridge before it completely sealed. The pipe tape bulked up the shoulder of the cartridge enough that it stopped the leaking.