Background: Cognitive factors might be the link between early attachment experiences and later depression. Similar cognitive vulnerability factors are discussed as relevant for both unipolar and bipolar disorders. The goals of the study were to test if there are any differences concerning attachment style and cognitive factors between remitted unipolar and bipolar patients compared to controls, and to test if the association between attachment style and depressive symptoms is mediated by cognitive factors. Methods: A path model was tested in 182 participants (61 with remitted unipolar and 61 with remitted bipolar disorder, and 60 healthy subjects) in which adult attachment insecurity was hypothesized to affect subsyndromal depressive symptoms through the partial mediation of dysfunctional attitudes and self-esteem. Results: No differences between patients with remitted unipolar and bipolar disorders concerning attachment style, dysfunctional attitudes, self-esteem, and subsyndromal depressive symptoms were found, but both groups reported a more dysfunctional pattern than healthy controls. The path models confirmed that the relationship between attachment style and depressive symptoms was mediated by the cognitive variables 'dysfunctional attitudes' and 'self-esteem'. Limitations: With the cross-sectional nature of the study, results cannot explain causal development over time. Conclusions: The results emphasize the relevance of a more elaborate understanding of cognitive and interpersonal factors in mood disorders. It is important to address cognitive biases and interpersonal experiences in treatment of mood disorders.