Understanding fluid distribution and migration in deformable low-permeability rock salt is critical for geologic disposal of nuclear waste. Field observations indicate that fluids in a salt formation are likely compartmentalized into relatively isolated patches and fluid release from such a formation is generally episodic. The underlying mechanism for these phenomena remains poorly understood. In this paper, a hydrological-mechanical model is formulated for fluid percolation in a rock salt formation under a deviatoric stress. Using a linear stability analysis, we show that a porosity wave (a train of alternating high and low porosity pockets) can emerge from positive feedbacks among intergranular wetting, grain boundary weakening and shear-induced material dilatancy. Fluid localization or episodic release can be viewed as a stationary or propagating porosity wave respectively. Fluid pockets transported via a porosity wave remain relatively isolated with minimal mixing between neighboring pockets. We further show that the velocity of fluid flow can be significantly enhanced by the emergence of a porosity wave. The concept and the related model presented in this paper provide a unified consistent explanation for the key features observed in fluid flow in rock salt. The similar process is expected to occur in other deformable low-permeability media such as shale and partially molten rocks under a deviatoric stress. Thus, the result presented here has an important implication to hydrocarbon expulsion from shale source rocks, radioactive waste isolation in a tight rock repository, and caprock integrity of a subsurface gas (CO2, H2 or CH4) storage system. It may also help develop a new engineering approach to fluid injection into or extraction from unconventional reservoirs.