bbvx wrote : where in the bible/which passage does it specifically forbid masturbation.
Onanism is Coitus interruptus(forbidden) not masturbation.
If you look at the relevant biblical texts you'll find that even coitus interruptus isn't forbidden per se - Onan's sin was trying to deceive his family and God by pretending to carry out the tradition of the time of seeking to impregnate his dead brother's wife on behalf of his dead brother so that that branch of the family would continue.
He claimed, before God and the family that he had done what was required of him, when in fact he had deliberately pulled out at the last moment in order to deny continuation to his brother's line. It has nothing to do with masturbation or early withdrawal, and everything to do with deliberate, malicious deception!