In the thinnest path problem, the objective is to find a path from a source to a destination that results in the minimum number of nodes overhearing the message by choosing the relaying nodes and their corresponding transmission power. We adopt a directed hypergraph model of the problem and establish the NP-completeness and strong inapproximability of the problem in 2-D networks. In 1-D networks and 1-D networks embedded in a 2-D field of eavesdroppers with arbitrary unknown locations, we show that a linear-complexity algorithm based on nested backward induction achieves optimality. In particular, no algorithm, even with the knowledge of the eavesdroppers locations, can obtain a thinner path than this algorithm which does not require the location information.