There exist a Moon treaty, but this is only signed and ratified by 15 countries, none of them capable of space travel. Even though treaties exist, the UN has no overruling power over independent nations, thus making the actual relevance of the treaty disputable.
The Moon treaty is not strictly banning commercial use of Lunar resources, but is likely to be used as a framework for regulating them if the issue comes up.
Together with many other fields of space law, there are a lot of ambiguity and untested cases related to the Moon treaty. It may not be possible to determine if the treaty would hold in the case of a dispute, being hugely dependent on international politics.