The incident took place late on Friday night in the vicinity of Bala Bolok district after a large number of Taliban insurgents stormed a military base.
A provincial council source confirmed that 25 Afghan soldiers were martyred in the attack.
Deputy provincial governor Mohammad Younis Rasooly confirmed the icident but did not elaborate further regarding the casualties of the Afghan armed forces.
In the meantime, the Ministry of Defense spokesman Gen. Dawlat Waziri said at least eighteen Afghan soldiers were martyred and two others were wounded in the attack.
Another member of the provincial council Dadullah Qani said more than 20 Afghan soldiers lost their lives in the attack.
The anti-government armed militant groups including the Taliban insurgents have not commented regarding the report so far.
Farah is among the relatively volatile provinces in the western parts of the country where the anti-government armed militant groups including the Taliban insurgents are actively operating in some of its districts.
The militants often carry out coordinated attacks on the security posts as the clearance and counter-terrorism operations are underway in some of the restive districts of Farah as well as the other western Farah provinces.