Leviticus 18 is the clearest about this, and the furthest relation it forbids is an aunt or uncle. So a cousin marriage is technically allowed.
There is a stigma against it, and I think there are also genetic reasons to avoid it (increases risk of genetic defects in children, though not much more than for women over 40). The royal family in England has been plagued with this, with so much intermarrying in the same family for generations, as I understand it. Charles Darwin, Edgar Allen Poe, Franklin Roosevelt and Albert Einstein all married their first cousins. (Tempting to try to draw parallels!) So an occasional incidence probably is okay religiously and medically, but a pattern of it, as exists in some parts of the world, will bring problems.
In Genesis you find closer marriages: Abraham to his half-sister Sarah; Cain to his full sister, of course. At the very beginning, somehow God made the genetics work out. With Abraham, it was important that Isaac marry within the line of faith, but not too close. I assume the same pattern was followed for Jacob's twelves sons, though we know little about where they got their wives.
Here's a good quote from John Calvin, at the end of a very long explanation of Lev. 18. He does not say cousin marriage is forbidden in the Bible.
"Since from long custom it is established that cousins-german should not marry, we must beware of giving scandal lest too unbridled a liberty should expose the Gospel to much reproach; and we must bear in mind Paul’s admonition, to abstain even from things lawful when they are not expedient. (1 Corinthians 10:23.)"
So, it would be like adminstering x-rays to people all day for years without shielding yourself. You are doing something knowing that nature brings risks and consequences for it. The Bible isn't against it explicitly, but it's not a good idea, for the sake of your future offspring. In that sense it would fall under the "love your neighbor" command, your neighbor being the children you produce.