The proper and direct cause of sin is to be considered on the part of the adherence to a mutable good; in which respect every sinful act proceeds from inordinate desire for some temporal good. Now the fact that anyone desires a temporal good inordinately, is due to the fact that he loves himself inordinately; for to wish anyone some good is to love him. Therefore it is evident that inordinate love of self is the cause of every sin.
Thomas Aquinas, Summa Theologiae 2-1.77.4. [Added Later: I suppose it should be noted that the word translated by the Dominican Fathers here as 'inordinate' would probably be better translated as 'disordered': the claim is that all sin is caused by loving oneself in a disordered way.]