The terrorists, some of whom were reportedly wearing military uniforms, sneaked into Kamra airbase at about 2 am despite a state of high alert at the facility.
About nine to 10 attackers breached at least three barriers and tried to target Saab-2000 surveillance aircraft, TV news channels reported.
Following a gun battle that lasted over three hours, state-run PTV reported that six terrorists had been gunned down by commandos.
Private TV news channels reported two security personnel were killed and several others, including an Air Commodore, were injured.
The military's media arm told reporters that the situation at the Kamra airbase was under control and that troops were conducting a search operation to ascertain if any more terrorists were inside the complex.
There was no official word on whether some attackers had escaped.
The attack came just two days after Pakistan Army chief Gen Ashfaq Pervez Kayani reiterated the country's commitment to the war on terrorism.
Amidst speculation about a new campaign against the Taliban in the tribal belt, Kayani said the war on terrorism was Pakistan's "own war and a just war too".