This paper proposes an efficient method to determine the concrete configuration of the color filter array (CFA) from demosaiced images. This is useful to decrease the degrees of freedom when checking for the existence or consistency of CFA artifacts in typical digital camera images. We see applications in a wide range of multimedia security scenarios whenever inter-pixel correlation plays an important role. Our method is based on a CFA synthesis procedure that finds the most likely raw sensor output for a given full-color image. We present approximate solutions that require only one linear filtering operation per image. The effectiveness of our method is demonstrated by experimental results from a large database of images.