"The incident occurred in Gulzar Aka locality of provincial capital Khost city at midday. The attackers fled the scene after the shooting," the source told media anonymously.
Deceased officers were inspecting commuters' vehicles at the post before the shooting.
The bodies were shifted to the city's main hospital and related departments were trying to notify the victims' next-of-kin.
The security source blamed Taliban militant group for the attack.
Provincial police spokesman Adel Haidar, when approached by media, confirmed the incident, saying an investigation has been undertaken and details will be shared with media later in the day.
The Taliban-led insurgency has been on the rampage since early April when the militant group launched a yearly rebel offensive.