This verse is identical to Proverbs 20:16. Remember that “surety” (6148) involves guaranteeing someone’s loan.
As I was looking into this I came across a statement by Adam Clarke that I will submit as a comment today.
“I suppose the meaning to be, If a stranger or unknown person become surety in a case, greater caution should be used, and such security taken from this stranger as would prevent him from running away from his engagements.”So? Be extra cautious when you don’t know someone. Trust should be a cautious investment not a rash expenditure.