Is there a substance that would react with seawater to produce a dense, insoluble, nonporous precipitate? Alternatively, is there a hygroscopic substance that will absorb water and expand into a dense/tough non-permeable mass? This is a material to seal off a small inner diameter pipe once water intrudes into it
A superabsorbent polymer sounds appropriate for this application, and the wikipedia article suggests they are used for "blocking water penetration in underground power or communications cable".
Will the water be removed from the pipe again after it has intruded, and if so do you need the seal to remain impermeable? I would expect this kind of polymer to dry out and shrink with time in the absence of water and it would not necessarily then be able to swell again with the same performance.