The escape of cosmic rays from the Galaxy is expected to shape their spectrum inside the Galaxy . Yet , this phenomenon is very poorly understood and , in the absence of a physical description , it is usually modelled as free escape from a given boundary , typically located at a few kpc distance from the Galactic disc . We show that the assumption of free escape leads to the conclusion that the cosmic ray current propagating in the circumgalactic medium is responsible for a non resonant cosmic ray induced instability that in turn leads to the generation of a magnetic field of strength \sim 2 \times 10 ^ { -8 } Gauss on a scale \sim 10 kpc around our Galaxy . The self-generated diffusion produces large gradients in the particle pressure that induce a displacement of the intergalactic medium with velocity \sim 10 - 100 km/s . Cosmic rays are then carried away by advection . If the overdensity of the intergalactic gas in a region of size \sim 10 kpc around our Galaxy is \gtrsim 100 with respect to the cosmological baryon density \Omega _ { b } \rho _ { cr } , then the flux of high energy neutrinos as due to pion production becomes comparable with the flux of astrophysical neutrinos recently measured by IceCube .