I made a cream cheese frosting a while ago. I didn't use all the frosting, so I put the rest (quite a lot actually) in the fridge with the intent to freeze it by the weekend if I hadn't used it. Fast forward a month and it's still in the fridge. I don't have the exact recipe in front of me, but it's cream cheese, powdered sugar, butter, extract, and milk. The milk is minimal and I can't remember if I actually used it (I don't always).
I should note that I keep my refrigerator very cold (veggies usually freeze after a couple days - I like milk super cold). I don't know if that would help preserve it longer, but thought it might be relevant.