The stress and displacement fields in an elastic medium containing a cavity limited by an ellipsoid of revolution are computed when the medium is subject to a generic shear parallel to the equatorial plane of the cavity, or to a tension or compression normal to the equator, when the surface of the cavity is subject to a normal stress, and the flattening of the cavity is assumed at 0.900, 0.990, 0.999. It is found that the maximum shear stress, at the points of maximum curvature of the cavity, for a flattening of 0.990, which is a possible value for the border of the irregular faults inside the crust of the Earth or for the dikes of magmatic chambers, may be 130 times the shear applied to the medium and the tilt may reach values of one minute of arc for a shear 10-5 the rigidity of the medium. These exceedingly large maximum shear stresses at the points of maximum curvature of the cavity could be reached in dikes of magmatic chambers when the migration of isothermal surfaces increases the temperature of the gases by a few degrees centigrade or when it causes a phase change with dilatation. The large maximum shear stresses at the border of the magmatic chamber are sufficient to cause the propagation of pre-existing fractures or the generation of new ones.