Exodus 20:14 says, “Do not commit adultery.”
The command of God is about as specific as a command can get. He does not simply suggest to us that we should not do it; he demands it.
The reason that adultery is such a serious sin is that marriage is a picture of the relationship between God the Father, God the Son and God the Holy Spirit.