In this paper a novel semifragile watermarking scheme for images with multiple bands is presented. We propose to use the remote sensing image as a whole, using a vector quantization approach, instead of processing each band separately. This scheme uses the signature of the multispectral or hyperspectral image to embed the mark in it and detects a modification of the original image, e.g. a replacement of a part of the image into the same image or any other similar manipulation. A modification of the image means to modify the signature of each point, all the bands simultaneously, because in multispectral images it does not have sense to modify a single band of all those that compose the multispectral image. The original multispectral or hyperspectral image is segmented in three-dimensional blocks and, for each block, a tree structured vector quantizer is built, using all bands at the same time. These trees are manipulated using an iterative algorithm until the resulting image compressed by the manipulated tree satisfies all the imposed conditions by such tree, which represents the embedded mark. Each tree is partially modified accordingly to a secret key in order to avoid copy-and-replace attacks, and this key determines the internal structure of the tree and, also, the resulting distortion, in order to make the resulting image robust against near-lossless compression. The results show that the method works correctly with multispectral and hyperspectral images and detects copy-and-replace attacks from segments of the same image and basic modifications of the marked image.