Self-trapping, stopping, and absorption of an ultrashort ultraintense linearly polarized laser pulse in a finite plasma slab of near-critical density is investigated by particle-in-cell simulation. As in the underdense plasma, an electron cavity is created by the pressure of the transmitted part of the light pulse and it traps the latter. Since the background plasma is at near-critical density, no wake plasma oscillation is created. The propagating self-trapped light rapidly comes to a stop inside the slab. Subsequent ion Coulomb explosion of the stopped cavity leads to explosive expulsion of its ions and formation of an extended channel having extremely low plasma density. The energetic Coulomb-exploded ions form shock layers of high density and temperature at the channel boundary. In contrast to a propagating pulse in a lower density plasma, here the energy of the trapped light is deposited onto a stationary and highly localized region of the plasma. This highly localized energy-deposition process can be relevant to the fast ignition scheme of inertial fusion.