Wide spectrum and miniaturization are the main challenges in the imaging spectrometer design. In this paper, we propose an ultra-compact dual band imaging spectrometer (CDBIS) with cemented freeform prisms, which works at both the visible-near-infrared (VNIR) from 400nm to 1000nm and the shortwave-infrared (SWIR) from 1000nm to 1700nm. The imaging spectrometer is only composed of three cemented prisms, a primary prism and two triangular prisms. And a freeform surface characterized by the Zernike polynomial is introduced in each prism. The CDBIS is dispersed by a diffraction grating, which is designed on the second surface of the primary prism. Based on vector aberration theory (VAT), the relationship among the astigmatism generated by the introduced freeform surfaces, the wavelength, and the field of view is studied. Accordingly, a wideband is realized by introducing the freeform surfaces after the diffraction grating. Furthermore, through optimizing the coefficients of Zernike polynomial terms, residual astigmatism at different wavelengths is well balanced. An imaging spectrometer with a volume of only 100c m 3 is obtained, with a spectral resolution of 1.45nm at VNIR and 2.40nm at SWIR, respectively. It has a huge potential for broadband space exploration.