Pakistan 'gravely concerned by Afghan-based' attack