The attack also wounded 12 others, mostly conscripts who were taken to hospital, according to a casualty tally document at a hospital.
The dead included three police officers and a still unidentified person, the hospital document obtained showed.
The attack took place in late afternoon in Ismailia city, on the western side of the Suez Canal, according to security officials, who spoke on condition of anonymity because they were not authorized to brief media.
The media office of Ismailia province described the attack as a terrorist strike.
State-run Al-Qahera New television reported that security forces killed one of the attackers.
It broadcast graphic footage purportedly showing a body, saying it was the dead militant.
No group claimed responsibility for the attack.
Egypt has been battling the Islamic State extremist group in the northern part of the Sinai Peninsula for years.
The militants have carried out numerous attacks in Sinai and elsewhere in the country, mainly targeting security forces, minority Christians and those who they accuse of collaborating with the military and police.
In May, at least 11 Egyptian soldiers, including an officer, were killed in a militant attack on a water pumping station east of the Suez Canal.
The pace of Daesh attacks in Sinai’s main theater and elsewhere has slowed to a trickle since February 2018, when the military launched a big operation in Sinai as well as parts of the Nile Delta and deserts along the country’s western border with Libya.