We present an analysis of the mid-IR properties of 18 globular clusters (GCs) [15 in the Galaxy and three in the Large Magellanic Cloud (LMC)] using the IRAS photometric data at 12 and 25 mum. Eight of the nine Galactic GCs with central escape velocities greater than 50 km s^-1 have IRAS sources within a radius of 60 arcsec from the centre, in agreement with the expectation that interstellar gas and dust should indeed be present in the central regions of the most massive clusters owing to mass-loss processes occurring in the late stages of the stellar evolution. No other significant correlation is found between IRAS source incidence and any intrinsic GC parameters. Warm dust (T~300K) is detectable mostly around unresolved giant stars, but in three massive GCs it is also present as diffuse emission. However, most of the dust might be cold (<e1>T<</e1>50K) and it was thus not detected by IRAS because of its limited sensitivity at 60 and 100 mum. The inferred mass-loss rates and statistical considerations are compatible with a non-steady mass-loss process with several episodes of ejection lasting a few times 10^5 yr.