Higher pain intensity was linked to reductions in working memory ability and increased activity in the ventromedial prefrontal cortex.