1 Uranus and Neptune
More loosely bound to the Sun’s gravity, the Solar System’s outer ice giants might be most vulnerable to having their orbits disrupted, perhaps drifting away into interstellar space or falling into orbit around the visitor.
2 Earth
If Earth’s orbit became more elliptical, it would present a severe danger to all life, as the amount of sunlight reaching the surface would become more variable and summers and winters more extreme. The Moon might shield us from the worst effects of asteroid bombardment.
3 Mercury
As the closest planet to the Sun, Mercury’s orbit is tightly bound by solar gravity, so it would probably survive more or less unchanged.
4 Venus
Venus might find its almost perfectly circular orbit disrupted into an ellipse. This could upset its slow rotation period and alter the Venusian climate.
5 Mars
If the orbit of Mars was nudged closer to the Sun, Mars could actually become more hospitable as its icecaps melted and its atmosphere thickened. But it would take the brunt of bombardment from asteroids.
6
Asteroid belt
The countless small bodies orbiting between Mars and Jupiter would undoubtedly be disrupted by a rogue world. Some might be thrown out of the Solar System entirely, but others, along with comets from beyond Neptune, would rain down on the inner Solar System, causing huge impacts.
7 Jupiter
As the Solar System’s largest planet, Jupiter would be best able to withstand the disruption of a rogue planet passing by. Its gravity would draw in many of the comets falling in from the edge of the Solar System.
8 Saturn
Saturn, the second most massive planet, would probably also survive, but its famous ring system might not withstand the disruption of the rogue planet’s gravity and the bombardment of cometary debris carried with it.