Praise be to Allah.
There is nothing wrong with the broker taking this additional amount, whether the buyer knows about it or not. That is because the owner’s saying to the broker: “Sell this for such and such an amount, and whatever is extra is yours” comes under a concession granted by a number of scholars and was also the view of Ahmad and Ishaaq (may Allaah have mercy on them). It was also narrated from Ibn ‘Abbaas (may Allaah be pleased with him). They regarded it as similar to mudaarabah.
Al-Bukhaari (may Allaah have mercy on him) said in his Saheeh: Chapter on the payments of the broker: Ibn Sireen, ‘Ata’, Ibraaheem and al-Hasan did not say that there was anything wrong with the payment of the broker. Ibn ‘Abbaas said: There is nothing wrong with saying “Sell this garment and anything in excess of such and such is for you”. And Ibn Sireen said: If he says, “Sell it for such and such, and any profit is for you, or it is between me and you,” there is nothing wrong with it. The Prophet (blessings and peace of Allaah be upon him) said: “The Muslims are bound by their conditions.” End quote.
Ibn Qudaamah (may Allaah have mercy on him) said in al-Mughni (5/86): If he says, “Sell this garment for 10, and anything more than that is for you,” that is valid and he is entitled to the additional amount. But al-Shaafa’i said: It is not valid.
The validity of this is indicated by the fact that Ibn ‘Abbaas did not see anything wrong with it, and because he is disposing of his property with his permission. So the condition that the profit is for him is valid, as in the case of mudaarabah and musaaqaah. End quote.
Imam Ahmad regarded that as permissible and as being similar to mudaarabah. But the majority did not allow it because the amount of the broker's payment in this case is unknown, as he does not know how much he will get.
The more correct view is that it is permissible, based on what has been narrated from the salaf concerning that.
And Allaah knows best.