...a perfect cure requires the perfect and complete expulsion of sickness. Now in this case there is a sevenfold disease, comprising three forms of sin -- original, mortal, and venial -- and four forms of penalty -- ignorance, malice, weakness, and concupiscence. Furthermore, as Jerome says, "what heals the foot does not heal the eye." And so it is appropriate that a combination of seven remedies are needed to drive out completely this sevenfold disease: against original sin, Baptism; against mortal sin, Penance; against venial sin, Extreme Unction; against ignorance, Orders; against malice, the Eucharist; against weakness, Confirmation; against concupiscence, Matrimony, which both tempers and excuses it.
[St. Bonaventure, Breviloquium, Monti, ed. and tr., Franciscan Institute Publications (St. Bonaventure, NY: 2005) p. 219. The quotation of St. Jerome is from the Commentary on Mark 9:28.]
Aquinas calls the four forms of penalty the "wounds of sin" (ST 2-1.85.3) and attributes the list to St. Bede, although we don't know why (it's not in any work by Bede that we know).
St. Thomas also has this scheme, but he mixes it with another scheme, the virtue scheme.