The following is from St.Athanasius,
And these too hazard the fulness of the mystery, I mean Baptism; for if the consecration is given to us into the Name of Father and Son, and they do not confess a true Father, because they deny what is from Him and like His Essence, and deny also the true Son, and name another of their own framing as created out of nothing, is not the rite administered by them altogether empty and unprofitable, making a show, but in reality being no help towards religion? For the Arians do not baptize into Father and Son, but into Creator and creature, and into Maker and work . And as a creature is other than the Son, so the Baptism, which is supposed to be given by them, is other than the truth, though they pretend to name the Name of the Father and the Son, because of the words of Scripture, For not he who simply says,
O Lord,' gives Baptism; but he who with the Name has also the right faith. On this account therefore our Saviour also did not simply command to baptize, but first says,
Teach;' then thus: `Baptize into the Name of Father, and Son, and Holy Ghost;' that the right faith might follow upon learning, and together with faith might come the consecration of Baptism.There are many other heresies too, which use the words only, but not in a right sense, as I have said, nor with sound faith, and in consequence the water which they administer is unprofitable, as deficient in piety, so that he who is sprinkled by them is rather polluted by irreligion than redeemed. So Gentiles also, though the name of God is on their lips, incur the charge of Atheism, because they know not the real and very God, the Father of our Lord Jesus Christ. So Manichees and Phrygians, and the disciples of the Samosatene, though using the Names, nevertheless are heretics, and the Arians follow in the same course, though they read the words of Scripture, and use the Names, yet they too mock those who receive the rite from them, being more irreligious than the other heresies, and advancing beyond them, and making them seem innocent by their own recklessness of speech. For these other heresies lie against the truth in some certain respect, either erring concerning the Lord's Body, as if He did not take flesh of Mary, or as if He has not died at all, nor become man, but only appeared, and was not truly, and seemed to have a body when He had not, and seemed to have the shape of man, as visions in a dream; but the Arians are without disguise irreligious against the Father Himself. For hearing from the Scriptures that His Godhead is represented in the Son as in an image, they blaspheme, saying, that it is a creature, and everywhere concerning that Image, they carry about with them the phrase, `He was not,' as mud in a wallet, and spit it forth as serpents their venom. Then, whereas their doctrine is nauseous to all men, forthwith, as a support against its fall, they prop up the heresy with human patronage, that the simple, at the sight or even by the fear may overlook the mischief of their perversity. Right indeed is it to pity their dupes; well is it to weep over them, for that they sacrifice their own interest for that immediate phantasy which pleasures furnish, and forfeit their future hope. In thinking to be baptized into the name of one who exists not, they will receive nothing; and ranking themselves with a creature, from the creation they will have no help, and believing in one unlike and foreign to the Father in essence, to the Father they will not be joined, not having His own Son by nature, who is from Him, who is in the Father, and in whom the Father is, as He Himself has said; but being led astray by them, the wretched men henceforth remain destitute and stripped of the Godhead. For this phantasy of earthly goods will not follow them upon their death; nor when they see the Lord whom they have denied, sitting on His Father's throne, and judging quick and dead, will they be able to call to their help any one of those who have now deceived them; for they shall see them also at the judgment-seat, repenting for their deeds of sin and irreligion.
(Four Discourses Against Arius chapter 18 - par.42, 43)
It seems plain from the above that St.Athanasius rejected the Baptism of the Arians - yet we know that according to the Ecumenical Councils, the Arians were accepted without "re"-Baptism. Arguably, this is a case of "economy" in the sense St.Nicodemus the Hagiorite taught.
In the above we see the rational for why St.Athanasius rejects the Baptism of Arians as being genuine - because while the Arians use the right "words", the doctrinal content behind those words (when used in an Arian church) would be erroneous.
Given what I've read so far on this subject, the message I get is that "heretical baptism" is of itself void, because of the disbelief/misbelief of the heretical sects administering it.
With this in mind then, what about Roman Catholic baptism? I suppose you could make the same argument as St.Athanasius makes against the Arians - on the basis of the filioque heresy. By extension this could be extended towards Protestantism in general (at least the old fashioned, "confessional" sorts, like Lutheranism or Presbyterianism), since by default they too are "filioquists"; and in the case of more modern, evangelical sects, they're so non-creedal and a-doctrinal in spirit that it's hard to know exactly what their denominations actually believe about God, and the Person of Christ.
Of course, this begs the question about those groups who do not differ on any points of doctrine, but simply on issues of authority or other ecclessiatical matters. While there is obviously a sin involved with those who are responsible for the schism, or those who are fully aware of it but have no interest in rectifying their position on the matter... given the basis St.Athanasius has here for denying the grace of Arian baptisms, could it be said that those groups are in fact "graceless"?
This is particularly pressing, since history is riddeled with schisms which were temporary in nature, and even ostensible schisms which involved parties who were later deemed genuine confessors and even martyrs for the faith. According to the first canon of St.Basil, who cites St.Cyprian as an authority, the communication of the Holy Spirit, and the Apostolic Succession, are broken by schismatics - but how do we distinguish ultimatly blameless ruptures in communion (though these can be quite bitter) from real schisms?
Seraphim