A woman came to the Messenger of Allah ﷺ and said, "Messenger of Allah, my mother has died, and she had a vow of fasting still owed. Should I fast on her behalf?"He replied, "Tell me, if your mother had a debt and you paid it off, would that settle it for her?"She said, "Yes."He said, "Then fast on behalf of your mother."
جاءت امرأة إلى رسول الله ﷺ فقالت: يا رسول الله، إن أمي ماتت وعليها صوم نذر أفأصوم عنها؟ قال: أرأيت لو كان على أمك دين فقضيتيه أكان يؤدي ذلك عنها؟ قالت: نعم. قال: فصومي عن أمك
Muslim narrated it in the Book of Fasting (156:1148), via Zakariya bin Adi, who said, Abdullah bin Amr informed us, from Zayd bin Abu Unaysa, who said, Hakam bin Utayba narrated to us, from Saeed bin Jubayr, from Ibn Abbas, and he related it as mentioned. Bukhari cited it as a suspended report in the Book of Fasting following hadith (1953), from Abdullah, with the same chain, in abridged form.Both of them agreed in narrating it via Zaida, from Amash, from Muslim Butayn, from Saeed bin Jubayr, from Ibn Abbas, who said, a man came to the Prophet ﷺ and said, "O Messenger of Allah, my mother died while she still owed a month's fast, should I make it up on her behalf?"Bukhari narrated the hadith in the Book of Fasting (1953), and Muslim in the Book of Fasting (155:1148).