By Agence France-Presse
"Initial reports indicate the attacker was a member of the Afghan National Defense and Security Forces," NATO's Resolute Support mission said in a statement.
The attacker was killed by "other Afghan forces", it added.
The wounded soldier was flown to Bagram Airfield north of the Afghan capital where he was receiving medical treatment. He was in a "stable condition".
An investigation into the incident was under way, the statement said.
The identity of the dead soldier was not immediately released.