The first attack was in the city of Kohat; the second in the suburbs of Peshawar.
The Taliban have vowed to continue a campaign of attacks against political parties they see as secular.
Dozens of people have been killed in recent days in bomb blasts in the run-up to the general election on 11 May.
At least five people were killed and more than 10 injured in Kohat by the blast outside the office of Syed Noor Akbar, who is running as an independent candidate.
Police spokesman Fazal Naeem said the blast damaged shops and vehicles and also hit an office of the Awami National Party (ANP), which has previously been targeted by the Taliban.
Tanveer Khan, another police official, told AFP news agency: “The election office was open at the time and supporters [of Mr Akbar] were sitting inside. The death toll may rise, the condition of some of the injured is critical.”
The explosion in Peshawar killed three people and injured 13, officials said.
The blast hit the office of another independent candidate, Nasir Khan Afridi, who has been campaigning for a seat in the Khyber tribal district.
Neither of the targeted candidates was in his office at the time of the attacks.
The Pakistani Taliban, or Tehreek-e-Taliban, issued a statement saying they were behind both blasts because they were opposed to any secular, democratic government.
Correspondents say violence has marred the campaign for the landmark election, in which one civilian government is due to be succeeded by another for the first time in the country’s history.
On Saturday, bomb attacks against supporters of the governing Pakistan People’s Party and the opposition MQM in Pakistan’s biggest city, Karachi, killed at least five people.