  We study how close passages of interstellar objects of planetary and
substellar masses may affect the immediate and long-term dynamics of the Solar
system. We consider two nominal approach orbits, namely, the orbits of actual
interstellar objects 1I/'Oumuamua and 2I/Borisov, assuming them to be typical
or representative for interstellar swarms of matter. Thus, the nominal orbits
of the interloper in our models cross the inner part of the Solar system.
Series of massive numerical experiments are performed, in which the
interloper's mass is varied with a small step over a broad range. We find that,
even if a Jovian-mass interloper does not experience close encounters with the
Solar system planets (and this holds for our nominal orbits), our planetary
system can be destabilised on timescales as short as several million years. In
what concerns substellar-mass interlopers (free-floating brown dwarfs), an
immediate (on a timescale of $\sim 10 - 100$ yr) consequence of such a MISO
flyby is a sharp increase in the orbital eccentricities and inclinations of the
outer planets. On an intermediate timescale ($\sim 10^3 - 10^5$ yr after the
MISO flyby), Uranus or Neptune can be ejected from the system, as a result of
their mutual close encounters and encounters with Saturn. On a secular
timescale ($\sim 10^6 - 10^7$ yr after the MISO flyby), the perturbation wave
formed by secular planetary interactions propagates from the outer Solar system
to its inner zone.
