Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:83:14

No! Rather, the stain has covered their hearts of that which they were earning.  

No indeed! — a deterrent and a warning against saying such ˹things˺. Rather there has slayed, engulfed, their hearts, covering them like rust that which they earned, of acts of disobedience.
القرآن:٨٣:١٤

كَلَّا ۖ بَلْ ۜ رَانَ عَلَىٰ قُلُوبِهِمْ مَا كَانُوا يَكْسِبُونَ  

{كلا} ردع وزجر لقولهم ذلك {بل ران} غلب {على قلوبهم} فغشيها {ما كانوا يكسبون} من المعاصي فهو كالصدأ.

See similar narrations below:

Collected by Ḥākim

The heart develops black spots due to sins

hakim:6Abū al-Naḍr Muḥammad b. Muḥammad b. Yūsuf al-Faqīh > Ibrāhīm b. Ismāʿīl al-ʿAnbarī > Abū Kurayb > Abū Khālid al-Aḥmar > Ibn ʿAjlān > al-Qaʿqāʿ b. Ḥakīm > Abū Ṣāliḥ > Abū Hurayrah

the Messenger of Allah ﷺ said, “When the servant ˹of Allah˺ commits a sin, a black spot appears upon his heart. If he repents, it is polished away. But if he repeats, ˹the black spot˺ increases until it grows large in his heart. That is the "rān" that Allah mentions in His Book: “Nay! But on their hearts is the rān...” [Muṭaffifīn 83:14]  

This ḥadīth is Ṣaḥīḥ and is not collected in the two Ṣaḥīḥs. Muslim objects to aḥādīth from al-Qaʿqaʿ b. Ḥakīm from Abu Ṣāliḥ
الحاكم:٦أَخْبَرَنِي أَبُو النَّضْرِ مُحَمَّدُ بْنُ مُحَمَّدِ بْنِ يُوسُفَ الْفَقِيهُ ثنا إِبْرَاهِيمُ بْنُ إِسْمَاعِيلَ الْعَنْبَرِيُّ ثنا أَبُو كُرَيْبٍ ثنا أَبُو خَالِدٍ الْأَحْمَرُ عَنِ ابْنِ عَجْلَانَ عَنِ الْقَعْقَاعِ بْنِ حَكِيمٍ عَنْ أَبِي صَالِحٍ عَنْ أَبِي هُرَيْرَةَ قَالَ

قَالَ رَسُولُ اللَّهِ ﷺ «إِذَا أَذْنَبَ الْعَبْدُ نُكِتَ فِي قَلْبِهِ نُكْتَةٌ سَوْدَاءُ۔ فَإِنْ تَابَ صُقِلَ مِنْهَا فَإِنْ عَادَ زَادَتْ حَتَّى تَعْظُمَ فِي قَلْبِهِ فَذَلِكَ (الرَّانُ) الَّذِي ذَكَرَهُ اللَّهُ ﷻ {كَلَّا بَلْ رَانَ عَلَى قُلُوبِهِمْ} [المطففين 14]»  

هَذَا حَدِيثٌ صَحِيحٌ لَمْ يُخَرَّجْ فِي الصَّحِيحَيْنِ وَقَدِ احْتَجَّ مُسْلِمٌ بِأَحَادِيثِ الْقَعْقَاعِ بْنِ حَكِيمٍ عَنْ أَبِي صَالِحٍ سكت عنه الذهبي في التلخيص في هذا الموضع