It was Rubio’s campaign who was leaking the insinuations about Cruz’s affairs, not Trump.
I would assume that Roger Stone — a Trump operative and specialist in sordid rumors— was ultimately responsible.