In this paper, we present an attack on a cryptosystem designed by using a spatiotemporal chaotic system. We show that the decryption system proposed in (Phys. Rev. E 66, 065202 (2002)) degenerates to the one-dimensional map under the constant input, and it is insensitive to the slight perturbations to input in specially selected intervals. Consequently, the attacker can use a very simple optimization algorithm to obtain the proper input value within only hundreds of iterations. Furthermore, we prove that there exits a linear dependency between the secret key and the obtained input value, so that the attacker can break this spatiotemporal chaos-based secure communication scheme easily. Both theoretical and experimental results show that the lack of security discourages the use of these cryptosystems for practical application.