The research was aimed at studying pitting corrosion, which precedes the appearance of fistulas in steel and cast-iron pipelines in water supply systems and leads to significant expenditures. The process of fistula formation is accompanied by the formation of tubercles and craters on the surface of a corroding metal. The study focused on examining the qualitative and quantitative composition of the solution, which is generated inside the tubercles during their growth. It was found that, during the operation of water pipelines, the concentration of aggressive chloride ions inside the tubercles increases significantly compared to the chloride content of the source water. The increase in chloride concentration leads to an accelerated corrosion rate, potentially causing the formation of fistulas over time. As a result of the study, a mechanism for changing the mineral composition of the solution inside the tubercles has been proposed. This is due to the manifestation of selective properties by a dense layer of tubercles. The study also examined the appearance of crystalline forms of corrosion products that form after removing pipes from the water supply system. The study also reveals the conditions of corrosion products emerging. Further studies on the structure and properties of a dense layer of corrosive sediment could be used to evaluate the effectiveness of various corrosion inhibitors.