It's not a glitch OP.
Dragons can (and do) attack the walled cities as well. Most every time I travel to Dawnstar, I get to kill a Dragon.
I've also had them attacking Windhelm and Solitude quite frequently. The most humorous one I witnessed was when I fast-traveled to the College of Winterhold. An Ancient Dragon spawned almost as soon as I arrived and then made the mistake of trying to land inside the courtyard (next to the statue) the Mages had killed it almost before I could draw my weapon! lmao
I heard and saw the Dragon, then saw it hover like it was trying to land, then those Six or Seven Master Mages that run the College (including the Archmage) unleashed Hell on it. I'm being as serious as a heart attack when I say that the Dragon was dead before it hit the ground. Free Dragon Soul for me!
But I digress. Back on topic, Dragons attacking the walled cities is no glitch, it's actually quite common in my game as well as other peoples games just from the other conversations that I've had on this subject.
