The seventh out of Ten Commandment speaks about "adultery". Lets take a look:
Exodus 20:14 לֹ֣֖א תִּֿנְאָֽ֑ף׃ ס
The traditional interpretation of "lo-tinaph" is "Thou shalt not commit adultery.". However, this is an incorrect or rather sloppy definition of the Hebrew word. In reality, the text is saying this:
"Not you shall commit sexual perversion"
Such translation is based on Leviticus 20:10 (from the Torah) and Jeremiah 3:9 (from the Tanakh).
If you will look closer at Leviticus 20:10, you will notice that it provides a clarification about the word. As you can see from this verse, if "tinaph" equal "adultery" there would be no need to specify that it is "with a woman of a man" or "with a woman of his associate". In other words, it is clear from this passage that "tinaph" can be committed in other ways than "with a woman of a man". Also, from last two words of this passage (hano'ef vehano'afet) it is clear that "tinaph" can be committed by both man and a woman, which implies "sexual perversion" rather than "adultery", because a man sleeping with another woman is not always considered "adultery" under Torah Law (see Exodus 22:16, Leviticus 19:20)
Jeremiah 3:9 also supports such interpretation as it says "and tinaph with the stone and with the wood". Once again, if "tinaph" = "adultery" there would be no need in clarification. And clarification itself shows that you can "tinaph" with people and/or things other than your husband.
Last, but not least, the 10 Commandments is a "compressed" Torah of sorts (see Ex 34:28, Deut 4:13 and Deut 10:4) which must account for all other commandments in the Torah. And since Torah talks about numerous sexual deviances (such as incest, homosexuality, bestiality, e.t.c) there is no other choice but to understand that "lo tinaph" = "not you shall commit sexual perversion".