The fatal blaze occurred shortly before midnight Thursday in Lambrecht, a town of 4,000 residents in a hilly region popular for its forested hiking tracks between Speyer and Kaiserslautern in the state of Rhineland-Palatinate.
A police spokeswoman said the fire possibly began in the kitchen of the apartment on the building's top floor. Among the dead were a couple registered as occupants. The other three were likely to have been visitors.
More than 100 firefighters fought the blaze through into Friday morning.
In Germany house fires with multiple fatalities are rare. In October 2015 four people died — also in an attic apartment — in Baden Württemberg state.