A defence ministry spokesman said heavy fighting was continuing in the area and reinforcements had been summoned.
Thirteen soldiers were wounded in the overnight battle, the ministry said.
The Taliban say they are in control of the base in Khakrez district. It is the latest in a series of army defeats by the militants in recent months.
Afghan intelligence sources had earlier told the BBC more than 40 soldiers were killed.
One source said the bodies of 30 soldiers had been transferred to Kandahar. Ten soldiers managed to escape, the source said.