Maya, you can say nothing. Unfortunately it would be a huge misstep for you to interfere in your daughter's relationship with her daughter.
Anything you say will be held against you. Your daughter might possibly be offended at your overreaching to discipline her daughter, even though you are doing it to defend your daughter. Her daughter will most certainly take offense as almost anything contrary offends a 12 year old girl.
12 is an awful age. And one filled with learning and humbling experiences. Trust that your daughter is taking care of it.
If you don't enjoy time with her daughter at the moment, take time to focus on your relationship with your daughter, her mother. Perhaps take her to lunch, spend one-on-one time with your daughter.
Perhaps she will open up and ask for advice, which is the ONLY WAY you could possibly offer any advice to her regarding her daughter. But, be very careful in how you deliver that advice. Make sure not to criticize her parenting or her daughter's character.
Mostly, just let her know (again, only and ONLY if she asks) that 12 is a terrible age and you're there for her anytime. And you're looking forward to celebrating with a glass of champagne when she survives her daughter's teen years - just like you did!