
So we know from TNG: Evolution that even ensigns like Wesley Crusher have access to nanites that, on accident, were released. The intent was not malicious, but could easily have been. A lowly saboteur aboard a starship could easily release nanites that await a pre-set signal that then corrupts a computer core and destroys it, rendering the ship helpless. But that's small time if you apply the Grey Goo scenario to the situation, which could be devestating if released in a critical location such as engineering. With the abundance of metals and polymers and conductors in engineering or other key areas, nanites could easily grow out of control, especially if they reached the warp core.
And that's simply on a starship, which has forcefields and nanites that could potentially combat the invasion. Suppose these nanites were loaded aboard a missile and launched from a remote base from deep inside the heart of a foreign power, maybe with a cloaking device or shielding from sensors. The missile wouldn't be aimed at the heart of the Federation, but rather at the hundreds of remote colonies and outposts with little to no defense against them. The resulting damage would be incalculable, and would set back colony efforts for the good part of a century, not just in terms of the resources devoted to each colony, but also from now needing to defend each colony.
Such a weapon, if it could be disguised to prevent its origin (like a batch stolen from an unsecure Federation lab) would leave the Federation baffled and reeling. Even if a remote colony could defend itself, the damage to the local ecosystem would make the world barren. It's a situation that, quite honestly, would be frightening.