This document discusses credit value adjustment (CVA) in the context of counterparty risk for credit default swaps (CDS), emphasizing the importance of effective risk management following the 2008 financial crisis. It presents a multi-dimensional structural default model which quantitatively estimates counterparty credit risk, illustrating how to integrate correlated dynamics of credit spreads and firm values. The chapter outlines innovative numerical methods for pricing CDS and estimating CVA while addressing limitations in existing approaches, enabling better calibration to market observed spreads.