Device for treating the air in a confined space, comprising: - a first module with an outlet suitable for being disposed in a confined space, an external tube that protrudes in rear position from the outlet, and an internal tube axially disposed inside the outlet and inside the external tube and defining a first axial conduit; said outlet being provided with openings for introducing air from the inside towards a first air gap between the internal tube and the external tube of the first module; - a second module with an outlet suitable for being disposed outside said confined space, an external tube that protrudes frontally from the outlet, a shank disposed inside the outlet and an internal tube that protrudes frontally from the shank, axially disposed inside the external tube and defining a second axial conduit; said outlet of the second module being provided with openings for introducing air from the outside towards an air gap between the internal tube and the external tube of the second module; - a first fan disposed at a front end of the first axial conduit of the internal tube of the first module in order to extract air from the first axial conduit and introduce air in the confined space; - a second fan disposed in said shank of the second module in order to extract air from said second conduit of the internal tube of the second module and discharge the air outside; - a heat exchanger disposed in said first air gap of the first module, said heat exchanger being provided with first conduits for the passage of air from the inside to the outside, and with second conduits for the passage of air from the outside to the inside; a filter disposed in said first axial conduit of the first module, in front of the first fan, in order to filter the air introduced in the confined space; - a radon detector suitable for detecting the presence of radon gas in said confined space; and - a control unit connected to said radon detector to receive information on the concentration of radon gas in said confined space; said control unit comprising a comparator to compare the concentration of radon gas detected by the radon detector with a threshold value stored in the comparator; said control unit being connected to said fans (V1, V2) in order to activate them when the radon detector detects a concentration of radon gas in the confined space that is higher than the threshold value of the comparator; wherein said first module and second module are telescopically coupled, the external tube of the second module slides on the external tube of the first module, and the internal tube of the second module is disposed inside the internal tube of the first module, forming a second air gap, in such a way that the two modules (1, 2) can slide in order to adjust to the thickness of a wall that separates the inside from the outside and wherein said device is installed. - a first module with an outlet suitable for being disposed in a confined space, an external tube that protrudes in rear position from the outlet, and an internal tube axially disposed inside the outlet and inside the external tube and defining a first axial conduit; said outlet being provided with openings for introducing air from the inside towards a first air gap between the internal tube and the external tube of the first module; - a second module with an outlet suitable for being disposed outside said confined space, an external tube that protrudes frontally from the outlet, a shank disposed inside the outlet and an internal tube that protrudes frontally from the shank, axially disposed inside the external tube and defining a second axial conduit; said outlet of the second module being provided with openings for introducing air from the outside towards an air gap between the internal tube and the external tube of the second module; - a first fan disposed at a front end of the first axial conduit of the internal tube of the first module in order to extract air from the first axial conduit and introduce air in the confined space; - a second fan disposed in said shank of the second module in order to extract air from said second conduit of the internal tube of the second module and discharge the air outside; - a heat exchanger disposed in said first air gap of the first module, said heat exchanger being provided with first conduits for the passage of air from the inside to the outside, and with second conduits for the passage of air from the outside to the inside; a filter disposed in said first axial conduit of the first module, in front of the first fan, in order to filter the air introduced in the confined space; - a radon detector suitable for detecting the presence of radon gas in said confined space; and - a control unit connected to said radon detector to receive information on the concentration of radon gas in said confined space; said control unit comprising a comparator to compare the concentration of radon gas detected by the radon detector with a threshold value stored in the comparator; said control unit being connected to said fans (V1, V2) in order to activate them when the radon detector detects a concentration of radon gas in the confined space that is higher than the threshold value of the comparator; wherein said first module and second module are telescopically coupled, the external tube of the second module slides on the external tube of the first module, and the internal tube of the second module is disposed inside the internal tube of the first module, forming a second air gap, in such a way that the two modules (1, 2) can slide in order to adjust to the thickness of a wall that separates the inside from the outside and wherein said device is installed.