As humanity embarks on a new era of space exploration, of establishing permanent human bases on the moon and Mars, sustainability must become the bedrock of our exploration efforts beyond Earth. With the NASA-led Artemis program, private lunar exploration initiatives and the China-led upcoming International Lunar Research Station, our return to the moon and push towards Mars are set to define the 21st century. However, as we chart these new territories, the environments of the moon and Mars are at risk of irreversible alteration by human activity. We must adopt sustainability as a core principle in space exploration to safeguard their pristine environments and, by extension, our own future on Earth.