In yesterday's attack, "six persons in a skiff armed with machinegun approached a tanker underway and fired twice towards the accommodation and bridge," said the International Maritime Bureau.
The crew sounded the alarm and activated fire hoses before altering the vessel's course, the IMB said on its website, adding the assailants then aborted their attack.
Separately, the NATO Shipping Centre said six assailants on a skiff armed with machineguns attacked a "merchant vessel" in the Strait of Hormuz, adding the vessel was now safe.
The Bahrain-based US Fifth Fleet could not immediately confirm the reports.
Heavily armed pirates using high-powered speedboats have operated in the nearby Gulf of Aden for years, preying on ships and at times holding them for weeks before releasing them for large ransoms paid by governments or shipowners.
However, the number of pirate attacks has diminished since international warships began patrolling waters off the Horn of Africa.
But such attacks are rare in the Strait of Hormuz at the entrance to the Gulf, a key gateway for global oil supplies.
The Pentagon has gradually strengthened its naval forces in the Gulf region in the past year after Iran at one point threatened to block the Strait of Hormuz.
