I'm far more concerned with Size to CR than Size to HD. Tiny creatures with CR 18 are usually poorly designed. This one is better than most.
Without HUGE power-ups (DR 40/magic; DR 30/-; SR 35, etc.), ts relatively low hit points are a disadvantage in comparison to other monsters with CR 18 and to a typical party.
Compare those to a Black Dragon at CR 18 with SR 23 and DR 15/Magic. It is significantly more powerful in terms of Special Qualities while being a bit underpowered in terms of hit points.
Does this make for a good monster? I'm not sure. A party of CR 18 should be able to defeat this using only 1/4 of its resources and I'm rather doubtful that it can be done.
If it is closer to CR 21, then the party may have an even bigger hit point advantage. It certainly lacks powerful physical attacks. Get it in an anti-magic field and it could be beaten to death with a rock. It would have to be a really hard rock, but still....
Debby