The Taliban follow the Hanafi madhab, however that is not really relevant as shall be explained later. I would assume that they administered is the punishment for Haraabah since kidnapping could fall into it and the punishment which has been administered is similar to the punishment of Haraabah.
Haraabah (حرابة) is the crime of illegally taking the wealth or life of another through force (e.g. using threat of weapons) where help can not reach.
The punishment for that includes crucifixion, which in Islam is essentially hanging the body of the culprit. This punishment is from the Quran and is not a matter of difference among the madhabs:
إنما جزاء الذين يحاربون الله ورسوله ويسعون في الأرض فسادا أن يقتلوا أو يصلبوا أو تقطع أيديهم وأرجلهم من خلاف أو ينفوا من الأرض ذلك لهم خزي في الدنيا ولهم في الآخرة عذاب عظيم
Indeed, the penalty for those who wage war against Allah and His Messenger and strive upon earth [to cause] corruption is none but that they be killed or crucified or that their hands and feet be cut off from opposite sides or that they be exiled from the land. That is for them a disgrace in this world; and for them in the Hereafter is a great punishment,
— Quran 5:33
And from hadith:
ورجل خرج محاربا لله ورسوله فإنه يقتل أو يصلب أو ينفى من الأرض
One who goes forth to fight with Allah and His Apostle, in which case he should be killed or crucified or exiled from the land
— Abu Dawud
For some translated references to Hanafi fiqh manuals which cover this see:
وإن قتلوا وأخذوا المال فالإمام بالخيار: إنشاء قطع أيديهم وأرجلهم من خلاف وقتلهم وصلبهم وإن شاء قتلهم وإن شاء صلبهم
If they murdered as well as taking property, then the leader has an option:
- If he wants, he amputates alternate hands and feet, kills them and
crucifies them, and
- If he wants, he kills them, and
- If he wants, he crucifies them.
— Mukhtasar Al-Qudoori - [English translation]
إذا قتلوا وأخذوا المال فالإمام بالخيار إن شاء قطع أيديهم وأرجلهم من خلاف وقتلهم وصلبهم وإن شاء قتلهم وإن شاء صلبهم
And the fourth is where they kill and seize wealth,
then the imam has the option of cutting off their hands and legs from
the opposite sides or to executing them and crucifying them, or of executing them (only), or of crucifying them.
— Hidayah fi Sharh Bidayat al-Mubtadi - [English translation]
For translated references from the fiqh of other madhabs see: