The witness, who spoke on condition of anonymity, said the message pinned to the bodies read: "Al-Qassam Brigades announces the execution of the traitors."
The message said men were killed "for their participation in providing information about the capabilities of the resistance and their factions and giving the enemy information about the movement of the fighters."
The men, the message added, "contributed to the martyrdom of many fighters by reporting their position."
An AFP correspondent in Gaza City saw a convoy of vehicles dragging what appeared to be the body of one of the men behind them.
There was no official confirmation of the killings, which came after a similar killing of one man on Friday.