If this is a straight section of pipe;

Cut it before and after the fitting. Install a coupling on one side and slide on a repair coupling on the other side. Install a new section of pipe. Slide down the repair coupling.

If this is at a fitting, please let us know.

Can you wiggle the pipes to see if this connection is loose?