What is the biblical basis for Jeremiah and John the Baptist being born without original sin? I am reading The Life &amp; Glories of Saint Joseph, by Edward Healy Thompson, which was first published in 1888. At the start of Chapter VII, in which the argument is made that Joseph was born without original sin (related, but not identical to how Mary was immaculately conceived), he says this:


  From Holy Scripture we also learn that some souls through divine predilection, as those of Jeremias [a.k.a. Jeremiah] and [John] the Baptist, were sanctified before they saw the light of day.


Unfortunately, Thompson doesn’t explain which parts of Holy Scripture he is referring to and seems to assume that the reader already knows.

What is the biblical basis that Jeremiah and John the Baptist were sanctified before birth (i.e. born without original sin)?
Is there a biblical basis for believing that the Prophet Jeremiah and St. John the Baptist were born without original sin?

Some Catholics do believe that the Prophet Jeremiah and St. John the Baptist were born without original sin. This pious belief, however has of yet not been raised to the level of a dogma.

First of let us consider St. John the Baptist.

As Catholics we believe that, by a divine prerogative from God, Mary was conceived with no stain of original sin. It is not impossible that St. John, although he was not conceived immaculately may have been purified while still in the womb of St Elizabeth! Although not dogma , the Church has not yet pronounced on this subject.

"There is a solid tradition in the Church that says St. John the Baptist was purified of original sin shortly after he was conceived, while still in the womb of St. Elizabeth. So, this episode of the Gospel referring to the child in the womb hearing Our Lady’s voice, understanding her words and loving her is completely credible." - Professor Plino Correa de Olivra

Here is how Wikipedia puts it: 


  "Some Catholics have held to a belief that John the Baptist never sinned, though this has never been a point of doctrine and is not binding in belief upon any adherent as is the sinlessness of Mary. In her Treatise of Prayer, Saint Catherine of Siena includes a brief altercation with the Devil regarding her fight due to the Devil attempting to lure her with vanity and flattery. Speaking in the first person, Saint Catherine of Siena responds to the Devil with the following words:
  
  ...humiliation of yourself, and you answered the Devil with these words: 'Wretch that I am! John the Baptist never sinned and was sanctified in his mother's womb. And I have committed so many sins..." — Catherine of Siena, , A Treatise of Prayer, 1370.[85][86]" 


St. Catherine of Sienna was declared a Doctor of the Church on October 3, 1970 by Pope Paul VI. 


  "Now during the sixth month, the Annunciation had taken place, and, as Mary had heard from the angel the fact of her cousin's conceiving, she went "with haste" to congratulate her. "And it came to pass, that when Elizabeth heard the salutation of Mary, the infant" — filled, like the mother, with the Holy Ghost — "leaped for joy in her womb", as if to acknowledge the presence of his Lord. Then was accomplished the prophetic utterance of the angel that the child should "be filled with the Holy Ghost even from his mother's womb". Now, as the presence of any sin whatever is incompatible with the indwelling of the Holy Ghost in the soul, it follows that at this moment John was cleansed from the stain of original sin. When "Elizabeth's full time of being delivered was come. . .she brought forth a son" (Luke 1:57); and "on the eighth day they came to circumcise the child, and they called him by his father's name Zachary. And his mother answering, said: Not so, but he shall be called John. And they said to her: There is none of thy kindred that is called by this name. And they made sign to his father, how he would have him called. And demanding a writing table, he wrote, saying: John is his name. And they all wondered" (Luke 1:59-63). They were not aware that no better name could be applied (John, Hebrew; Jehohanan, i.e. "Jahweh hath mercy") to him who, as his father prophesied, was to "go before the face of the Lord to prepare his ways; to give knowledge of salvation to his people, unto remission of their sins: through the bowels of the mercy of our God" (Luke 1:76-78). Moreover, all these events, to wit, a child born to an aged couple, Zachary's sudden dumbness, his equally sudden recovery of speech, his astounding utterance, might justly strike with wonderment the assembled neighbours; these could hardly help asking: "What an one, think ye, shall this child be?" (Luke 1:66)." - Catholic Encyclopedia. 


Now if St John was in fact purified while in the womb of his mother he would the greatest of those born of women (Matthew 11:11). Mary's immaculate conception still puts her above St John!


  "Truly I tell you, among those born of women no one has arisen greater than John the Baptist; yet the least in the kingdom of heaven is greater than he." 


As for the Prophet Jeremiah, the biblical references are seemingly limited to a single passage.

St. Joseph’s “confirmation in grace” makes perfect sense in light of the Holy Family’s role in the Incarnation, and St. John the Baptist’s similar confirmation is biblical. But, why does tradition single out Jeremiah, of all the prophets, for a similar honor?  

Most sources point to a single passage:


  “Before I formed thee in the bowels of thy mother, I knew thee: and before thou camest forth out of the womb, I sanctified thee, and made thee a prophet unto the nations.” (Jeremiah 1:5, D-R)
  
  [Cornelius] Lapide says that Jeremias was the one prophet of the OT who was sanctified in the womb for the reason that by his holiness he sustained Jerusalem and the assembly of Israel at the most difficult time in Old Testament history – the exile.
  
  Also, Jeremias was a prophet not only to the Jews but also the Gentiles:
  
  
    et antequam exires de vulva, sanctificavi te,
    
    et prophetam in gentibus dedi te. (Jer 1:4)
  
  
  So in this way, Jeremias belonged to the New Covenant in a mystical sense.
  
  I (Dr Tallor Marshall) would also add, though Lapide doesn’t say it, that Jeremias appears again in 2 Maccabees as the special advocate of Jerusalem. 
  
  Why Was Jeremias Sanctified in His Mother’s Womb?


Here are a few helpful articles for those interested:


According to the Catholic Church, what did Jesus mean by saying that the least in the kingdom of heaven in greater than John the Baptist?
Who Was Born Without Original Sin?