Better executive functioning may be associated with more adaptive stress responses than worse executive functioning, potentially due to less propensity for rumination. In this study, we tested the hypothesis that better executive functioning would be associated with decreased total cortisol output (AUCg) and cortisol sensitivity with respect to increase/decrease (AUCi) in response to a stressor, and that this association is mediated by stress task rumination. Participants completed measures of inhibition, updating/monitoring, and cognitive flexibility, a social-evaluative stressor, and a self-report measure of rumination about the stressor. Participants provided saliva samples at six time points to measure cortisol output and sensitivity. Cognitive flexibility was negatively associated with stress task rumination (r = − .30, p < .05); however, this association was no longer significant when adding covariates (i.e., participant age, sex, highest education, and body mass index) to a regression model. Cognitive flexibility was also associated with AUCg (r = − .28, p < .05), while rumination was associated with AUCi in non-adjusted (r = .28, p < .05) and adjusted (b = .81, p < .05) analyses. Furthermore, females demonstrated better cognitive flexibility (r = .26, p < .05) and lower AUCg (r = − .45, p < .05) compared to males. Findings demonstrate the importance of cognitive flexibility and rumination when predicting dynamic measures of stress-induced cortisol over time.