The attack occurred on Wednesday, when a group of militants, including one carrying explosives, attacked the building in Tripoli.
Three of the dead were the commission staff members and the other four were security personnel.
The assailant with the explosives “blew himself up inside the commission, and the others set a part of the building on fire.
It was not immediately clear what group was responsible for the Wednesday attack.
The incident came as Libya is preparing for general elections, a source of hope to end years of violence.
The country has been in turmoil since 2011, when NATO helped local militants overthrow longtime dictator Muammar Gaddafi.
Rival political and armed militia groups have since been fighting one another in the almost lawless country.
The terrorist group of Daesh has established a foothold in Libya amid the security vacuum.