A number of the cars exploded in the Sheikh Radwan neighborhood, considered a Hamas stronghold, Palestinian media reported.
Abu Hamar, a commander in Hamas' security forces in Gaza, blamed ISIS for the explosions and called for a Hamas reaction.
A photo reportedly taken near the scene of one of the explosions shows the ISIS logo which may indicate that the group's militants took responsibility for the attack.
In May, Hamas said that so-called “Islamic State” sympathizers in the Gaza Strip are making their presence felt on social media, but the group has no real foothold in the Palestinian territory.
Sami Abu Zuhri, a Hamas spokesman, said "there is nothing called the Islamic State in the Gaza Strip," adding that the group only had some supporters in the territory.
"We do not fight people because of what they think, but at the same time, we do not allow any violations of security, whether by groups or individuals," Abu Zuhri said.