This study examined the impact of psychosocial stressors and opioid use disorder on cognitive executive functions in 46 participants with opioid use disorder. The Iowa Gambling Task and Opioid Word Stroop test assessed emotional and logic executive functions. Better social stability and food security were associated with worse cognitive performance, while cannabis use was linked to better performance. Concurrent polysubstance use was also tied to enhanced cognitive function. The small sample size limited conclusions, but food security, cannabis use, and drug stigma warrant further study regarding their influence on executive function.