Previous research has shown that attachment anxiety is a good predictor of body mass index. This relationship is significantly mediated by disinhibited (over-) eating and is likely to reflect a specific form of affect regulation. This study explored whether obese bariatric surgery candidates (BSC; N = 34) and bariatric surgery recipients (BSR; N = 15) would show higher levels of attachment insecurity (higher attachment anxiety and/or higher attachment avoidance) than a group of age and gender-matched lean controls (N = 54). Mediation analyses showed that compared to lean controls (M = 2.96, SE = 0.1), both BSC (M = 3.5, SE = 0.2) and BSR (M = 3.4, SE = 0.2) groups had a more insecure attachment orientation. These relationships were significantly mediated by disinhibited eating (BSC: lower limit confidence interval (LLCI) = 0.06 and upper limit confidence interval (ULCI) = 0.62; BSR: LLCI = 0.02 and ULCI = 0.76). There was no such relationship when the BSC and BSR groups were compared (LLCI = - 0.15 & ULCI = 0.3). These observations suggest that attachment insecurity may be a risk factor for obesity and bariatric surgery because of associated disinhibited eating. Moreover, these factors may be important to consider when bariatric surgery results in poor outcomes.