"And you shall not wrong a stranger" (Exodus 22:20): [this forbids] two kinds of wronging in one matter — one is wronging in money, and one is wronging in words. "Nor oppress him": [this forbids] two kinds of oppression in one matter — one is oppression in money, and one is oppression in words. "For you were strangers" (Exodus 22:20): He said to them, if you reproach him with being a stranger, the stranger can reproach you in turn, "for you were strangers in the land of Egypt." So it says, "lest I strip her naked and set her forth" (Hosea 2:5).
Do Not Wrong the Stranger for You Were Strangers in Egypt
Mekhilta DeRabbi Shimon Ben Yochai 22:20
וגר לא תונה שתי אונאות בדבר אחת אונאת ממון ואחת אונאת דברים: ולא תלחצנו. שתי לחיצות בדבר אחת לחיצת ממון ואחת לחיצת דברים: כי גרים הייתם. אמר להם אם תופשין אתם אותי לשום גר אף גר תופש אתכם על שום כי גרים הייתם בארץ מצרים כן הוא אומר (הושע ב' ה') פן אפשיטנה ערומה והצגתיה וגו':