The officials said the attack was launched by a group of around 20 Taliban insurgents who came to the area from the northern Parwan province.
The officials further added that the insurgents fled back to Shenwari district after the Afghan forces responded to their fire.
According to the officials, at least one civilian was wounded in the attack and there are no other reports of casualties.
The Taliban militants group has not commented regarding the report so far.
This comes as the Taliban insurgents launched a similar attack that led to the blockage of Salang tunnel pass nearly a year ago.
The attack was launched on Southern part of Salang pass late in July last year which triggered gun battle between the Afghan security forces and the assailants.