"And he spoke concerning the trees, etc." (I Kings 5:13). Now is it possible for a person to speak to the trees? Rather, Solomon said: For what reason is a leper purified by means of the tallest among the trees and by the lowest of the low — by cedar wood [and crimson thread] and hyssop (Leviticus 14:4)? It is only because he exalted himself like the cedar that he was stricken with leprosy; once he humbled himself like the hyssop, therefore he was healed by means of hyssop.
Why the Leper Is Healed by Cedar and Hyssop
Midrash Tanchuma Buber, Chukat 14:2
וידבר על העצים וגו' (שם שם יג), וכי אפשר לו לאדם לדבר על העצים, אלא אמר שלמה מפני מה מצורע נטהר על הגבוה שבעצים, ובנמוך שבנמוכים, בעץ ארז [ושני תולעת], ואזוב (ויקרא יד ד), אלא על ידי שהגביה עצמו כארז לקה בצרעת, כיון שהשפיל עצמו כאזוב, לכך נתרפא על ידי אזוב.