This research aims to construct a model for pricing counterparty credit risk (CCR) for synthetic collateralized debt obligation (CDO) tranches by considering the relationship between the counterparty and the credit portfolio. A stochastic intensity model is adopted to describe the default event of the counterparty, and a two-factor Gaussian copula model is applied to account for the relationship between the counterparty and underlying credit portfolio. By analyzing the data of CDX NA IG index tranches, we find that the relationship has a significant influence on the credit value adjustment (CVA) for index tranches and, hence, that it should not be ignored when a contract is initiated. In addition, we discover that the influence has opposite effects and asymmetrical magnitude with respect to the protection buyers and protection sellers.