"That the sins of his people were imputed to him, is plainly affirmed: 'The Lord laid on him the iniquity of us all.'-- Isa. liii. 6. It is declared, that Christ suffered, for sins, for the unjust, for the transgressions of his people; which necessarily supposes that he was charged with their guilt."
WCF 8.4 - Robert Shaw's commentary on the Westminster Confession of Faith, The Reformed Faith 1845:
Christ willingly undertook the office, not only of a mediator, but also of a surety. A surety is one who engages to pay a debt, or to suffer a penalty, incurred by another. Such a surety is our Lord Jesus Christ. He undertook, in the everlasting covenant, to be responsible to the law and justice of God for that boundless debt which his elect were bound to pay. And having become their surety, by his Father’s appointment and his own voluntary engagement, their guilt was legally transferred to him, and all his obedience and sufferings in their nature were vicarious, or in the room of those whom he represented before God. "Our Lord’s suretyship is denied by the Socinians, who maintain, that he did not suffer and die in our stead, but only for our good; or to confirm his doctrine, and to leave us an example of patience and resignation to the will of God under our suffering. His proper suretyship is also denied by the Neonomians, who maintain, that ‘he only satisfied divine justice for sinners, in so far as it was necessary to render it consistent with God’s honour to enter into lower terms of salvation with them.’ And it is likewise denied by all those who are opposed to the doctrine of the imputation of our sins to Christ, and are the advocates of a general and indefinite atonement." They may speak of Christ as the substitute of sinners, and of his sufferings as vicarious, but the doctrine of his proper suretyship, which necessarily involves the imputation to him of the guilt of his people, and his endurance of the punishment which they had incurred, can have no place in their system. In Scripture, however, the term surety is expressly applied to Christ.—Heb. vii. 22. And he is not, as Socinians allege, a surety for God, to secure the performance of his promises to us, but a surety to God for elect sinners; and, as such, engaged to pay the debt of obedience which they owed to the law, as a covenant of works, and the debt of punishment which they had contracted by sin. That the sins of his people were imputed to him, is plainly affirmed: "The Lord laid on him the iniquity of us all."—Isa. liii. 6. It is declared, that Christ suffered, for sins, for the unjust, for the transgressions of his people; which necessarily supposes that he was charged with their guilt.—1 Pet. iii. 18; Isa. liii.