Global oil prices surged after several ships were attacked near the Strait of Hormuz, raising fears of prolonged disruption to a key energy route.