We analyze the general risk-neutral valuation for counterparty risk embedded in a Credit Default Swap (CDS) contract by adapting the recent findings of Brigo and Capponi (2009) to allow for simultaneous defaults among the two parties and the underlying reference credit, while the counterparty risk is considered bilaterally. For the default intensities, we employ a Markov copula model allowing for the possibility of a simultaneous default. The dependence between defaults of three names in a CDS contract and the wrong-way risk will thus be represented by the possibility of simultaneous defaults. We investigate numerically the effect of considering simultaneous defaults on the counterparty risk valuation of a CDS contract. Finally, we study a CDS contract between Royal Dutch Shell and British Airways based on Lehman Brothers applying this methodology, illustrating the bilateral adjustments with the possibility of simultaneous defaults in concrete crisis situations.