An efficient willow tree algorithm is proposed to price CVA (credit valuation adjustment) with WWR(wrong way risk), which can also calibrate the default probability by credit swap spreads. Besides, some numerical experiments are presented to illustrate the accuracy and efficiency of the proposed method.