A mathematical model of the flow of viscous fluid in the pipeline in the presence of leakages through its surface, which is based on the Navier-Stokes equation system in a two-dimensional rectangular area with a special type of boundary conditions is developed. They take into account the geometric configuration of the leakage area. It is believed that the fluid motion is performed under the pressure drop, which is steady along the length. To solve this system, numerical finite difference method, which allows to realize the scheme, which on the first step is implicit on the longitudinal coordinate, and on the second - on the cross, is developed. The stability study using the spectral feature method is carried out, stability conditions for the case of calculating the flow with the set parameters and for a given type of the pipeline geometry are determined. Calculations for a wide class of boundary conditions are conducted. The patterns of the velocity distribution of various configurations of leakage areas and in their absence are defined. It is found that the effects of leakage presence are especially noticeable in the zone near the pipeline wall.The pattern of deviation from the symmetry of distribution of the value of longitudinal component, depending on the distance to the leakage, velocity change near the pipeline wall, depending on the leakage intensity and parameters of the computational grid is determined. Peculiarities of flow behavior near the wall after the longitudinal component acquired zero value are defined. The results can be used when designing the localization system of small leakages of oil products with different leakage area configurations. In addition, the specified method can be used when studying utility pipelines, process pipelines in various industries. It was found that the developed method adequately describes the studied phenomena. Directions for further research, such as identifying dependencies for different kinds of liquids, pipeline specifications, leakage area configurations, as well as studies of more complex dependencies of pressure on the coordinates of the studied area are defined.