The Iranian men were convicted of collaborating directly with the IS militants who carried out the attacks on June 7 2017, Mizan Online reported.
"They supported them financially and procured arms, while being informed of the aims and the intentions of the terrorist group," the agency said.
Iran warns Pakistan of Islamic State presence along Pak-Afghan border
It did not specify when the executions took place, but the Tasnim news agency said the sentences were carried out on Saturday.
IS claimed responsibility for the dual attack on Iran's parliament and the shrine of revolutionary leader Ayatollah Ruhollah Khomeini that killed 17 people and wounded dozens.
The assault was the first and only claimed by the Islamic State group in Tehran.
Iran was targeted for supporting Iraqi and Syrian authorities in their fight against IS and other militant groups.
Five assailants died, either in suicide bombings or killed by Iranian security forces.
Legal proceedings continue for others allegedly involved in the attacks, Mizan Online said.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ