The Palestinian health ministry said that the assailants were Mohammed Sabaaneh, aged 17, and Nur Eddine Sabaaneh, 23, from Qabatia near Jenin in the north of the Israeli-occupied West Bank.
The incident, in Huwara in the northern West Bank, was the second of the day. Earlier a Palestinian stabbed and moderately wounded a soldier in Jerusalem before he was arrested.
A wave of violence since the start of October has claimed the lives of 135 people on the Palestinian side, 19 Israelis, an American and an Eritrean.
In today's Huwara incident, the army said a second soldier may have been hit by fire from his own side but it was still investigating.
Also Read
The Israeli rescue service said it took two soldiers to hospital, one moderately wounded and one lightly, but it did not describe their injuries.
A number of Palestinians have attempted attacks with kitchen knives in what some analysts have described as virtual suicide missions.
Palestinians have grown frustrated with Israel's occupation, the complete lack of progress in peace efforts and their own fractured leadership.
US-backed peace talks between the Palestinians and Israel collapsed in April 2014 after nine months of fruitless meetings amid bitter recriminations and mutual blame.