The classical Stefan problem involves the motion of boundaries during phase transition, but this process can be greatly complicated by the presence of a fluid flow. Here we consider a body undergoing material loss due to either dissolution (from molecular diffusion), melting (from thermodynamic phase change), or erosion (from fluid‐mechanical stresses) in a fast‐flowing fluid. In each case, the task of finding the shape formed by the shrinking body can be posed as a singular Riemann‐Hilbert problem. A class of exact solutions captures the rounded surfaces formed during dissolution/melting, as well as the angular features formed during erosion, thus unifying these different physical processes under a common framework. This study, which merges boundary‐layer theory, separated‐flow theory, and Riemann‐Hilbert analysis, represents a rare instance of an exactly solvable model for high‐speed fluid flows with free boundaries.© 2017 Wiley Periodicals, Inc.