More insight at this site.
The Catholic magisterium does not, and never has, advocated unqualified abolition of the death penalty. I know of no official statement from popes or bishops, whether in the past or in the present, that denies the right of the State to execute offenders at least in certain extreme cases. The United States bishops, in their majority statement on capital punishment, conceded that "Catholic teaching has accepted the principle that the State has the right to take the life of a person guilty of an extremely serious crime." Joseph Cardinal Bernardin, in his famous speech on the "Consistent Ethic of Life" at Fordham in 1983, stated his concurrence with the "classical position" that the State has the right to inflict capital punishment.
....
Catholic authorities justify the right of the State to inflict capital punishment on the ground that the State does not act on its own authority but as the agent of God, who is supreme lord of life and death. In so holding they can properly appeal to Scripture. Paul holds that the ruler is God's minister in executing God's wrath against the evildoer (Romans 13:4). Peter admonishes Christians to be subject to emperors and governors, who have been sent by God to punish those who do wrong (1 Peter 2:13). Jesus, as already noted, apparently recognized that Pilate's authority over his life came from God (John 19:11).
Pius XII, in a further clarification of the standard argument, holds that when the State, acting by its ministerial power, uses the death penalty, it does not exercise dominion over human life but only recognizes that the criminal, by a kind of moral suicide, has deprived himself of the right to life. In the Pope's words,
Even when there is question of the execution of a condemned man, the State does not dispose of the individual's right to life. In this case it is reserved to the public power to deprive the condemned person of the enjoyment of life in expiation of his crime when, by his crime, he has already dispossessed himself of his right to life.
lots more:
http://www.catholiceducation.org/articles/religion/re0461.html