Certified GKH Gardening Expert
That sounds like too much water for a cactus. They don't require a lot of moisture and since it is in a terrarium, the humidity is high as well. Not enough light could be a factor, too, or cool temperatures.
Here is more:
https://www.gardeningknowhow.com/ornamental/cacti-succulents/scgen/cactus-going-soft.htm
if the cactus is not a crawling variety, include over/underwatering, not enough light, too much humidity, and cold temperatures.
The most sinister would be a fungal/bacterial infection. This article will help you should this be the case: https://www.gardeningknowhow.com/ornamental/cacti-succulents/scgen/cactus-going-soft.htm