Effective assessment of the stress-strain state of the near wellbore zone is one of the key problems in the process of modeling the stability of the wellbore walls. Drilling mud infiltrates permeable rocks during the drilling process. This causes a change in the elastic-strength properties of rocks and, accordingly, the redistribution of tension around the well. At present, there are no computational methods that take into account the effect of saturation fluids on the change in the elastic-strength properties. A unified system approach for the implementation of this type of research when changing infiltration fluids is not developed yet. In this paper, we study the effect of various types of drilling mud on the elastic-strength properties of core samples, which are equivalents of rocks (composite samples made of different sand and clay cement facies). Measurements of porosity, acoustic properties, ultimate strength for uniaxial compression, and static Young's modulus at different samples saturation are made. Studies of the elastic-strength properties of the samples are performed after 48 and 168 hours soaked in the drilling fluids. According to the study, the relative change in the dynamic Young's modulus with various sample saturation is 13.4-27.7%, the static young modulus (compression) is 19-40%, the dynamic Poisson ratio is 1.4-14.6% and the uniaxial compression strength is 28 -35%. The data obtained indicate a significant effect of the saturating fluid on the elastic and strength properties of materials. A numerical one-dimensional simulation of the stability of the borehole walls is performed, taking into account the type of saturating fluid and the relative change in the elastic-strength properties. The results indicate a change in the stability of the wellbore walls; the indicators of the change in the equivalents of the collapse gradient and hydraulic fracturing are 0.2-0.3 g / cm3. A change in Young's modulus of 30% affects the design parameters of a hydraulic fracturing fracture - by width up to 100%, by half length up to 50%.