Since there's about zero chance of her being able to catch commercial flights for her itinerary, what was leaked was something that wasn't going to happen.
Nobody was endangered by saying she wasn't going to be going there. Perhaps it may heighten suspicions in the future that if Pelosi vanishes from the public spotlight for a day or two that she's on the way to someplace risky, but there are so many such places that it doesn't matter.
More than likely there'd have been some sort of photo shoot from these places, tweeted in nearly real time. To the extent that Taliban operations require days of planning, she'd be safe. To the extent that they require almost no planning, the tweet would be a much more egregious leak.
On Boxing Day there was a report in the WaPo that a plane spotter in Britain had sighted AF1 and immediately published his picture with location, direction, est. of speed. So that when the press was unawares that Trump was out of the country, somebody could have easily seen that Trump was in the skies over Britain, and heading SE. Get a few others to sight AF1, complete the great circle, and see where he's likely heading.