  Galaxy clusters detected through the thermal Sunyaev-Zeldovich (tSZ) effect
are a powerful cosmological probe from which constraints on cosmological
parameters such as $\Omega_{\mathrm{m}}$ and $\sigma_8$ can be derived. The
measured cluster tSZ signal can be, however, contaminated by Cosmic Infrared
Background (CIB) emission, as the CIB is spatially correlated with the cluster
tSZ field. We quantify the extent of this contamination by applying the
iterative multi-frequency matched filter (iMMF) cluster-finding method to mock
Planck-like data from the Websky simulation. We find a significant bias in the
retrieved cluster tSZ observables (signal-to-noise and Compton-$y$ amplitude),
at the level of about $0.5\, \sigma$ per cluster. This CIB-induced bias
translates into about $20$% fewer detections than expected if all the Planck
HFI channels are used in the analysis, which can potentially bias derived
cosmological constraints. We introduce a spectrally constrained iMMF, or
sciMMF, which proves to be highly effective at suppressing this CIB-induced
bias from the tSZ cluster observables by spectrally deprojecting the
cluster-correlated CIB at the expense of a small signal-to-noise penalty. Our
sciMMF is also robust to modelling uncertainties, namely to the choice of
deprojection spectral energy distribution. With it, CIB-free cluster catalogues
can be constructed and used for cosmological inference. We provide a publicly
available implementation of our sciMMF as part of the SZiFi package.
