The Messenger of Allah ﷺ forbade that two people hold a private conversation excluding a third.
حدثنا هشام بن عمار حدثنا سفيان بن عيينة عن عبد الله بن دينار
نهى رسول الله ﷺ أن يتناجى اثنان دون الثالث
[Its isnad is sahih] Reference, Ahmad narrated it: 2/9, and Humaydi, no. 645 (in my edition), from Sufyan, with the same wording, and he explicitly stated hearing it directly, and he was corroborated by a group of narrators, among them Malik (Muwatta: 2/988, 989).