Short answer
By the doctrine's own logic, he would have. Many Christians hold that every child inherits Adam's sin. Paul says Jesus was "made of the seed of David according to the flesh". Since Joseph was not his father, that could only be through Mary. If sin passes from parent to child, it would pass to Jesus through her. If he took nothing from her flesh, he was not David's seed, and the prophecies Christians apply to him fail. Catholics answer that Mary herself was kept free of original sin. That teaching became a dogma only in 1854, and a Catholic encyclopedia admits no clear proof of it can be brought from Scripture. Islam has no such problem: every child is born pure, and no one inherits another's sin.
Full explanation
Original sin
Paul writes that sin entered the world through one man, Adam, and death through sin, "and so death passed upon all men". Christians also quote David: "in sin did my mother conceive me". From these, Catholic and most Protestant churches teach that every child is born carrying Adam's sin.
“Wherefore, as by one man sin entered into the world, and death by sin; and so death passed upon all men, for that all have sinned:”
“Behold, I was shapen in iniquity; and in sin did my mother conceive me.”
Jesus was of David's flesh only through Mary
The New Testament insists that Jesus was a descendant of David in his body. Paul says he "was made of the seed of David according to the flesh". Peter says God (﷾) swore to David that "of the fruit of his loins, according to the flesh" He would raise up Christ. Yet Luke says Jesus was only "as was supposed" the son of Joseph, and Matthew calls Joseph the husband of Mary, of whom Jesus was born. If Jesus came from David's flesh at all, it was through his mother.
“Concerning his Son Jesus Christ our Lord, which was made of the seed of David according to the flesh;”
“Therefore being a prophet, and knowing that God had sworn with an oath to him, that of the fruit of his loins, according to the flesh, he would raise up Christ to sit on his throne;”
“And Jesus himself began to be about thirty years of age, being (as was supposed) the son of Joseph, which was the son of Heli,”
“And Jacob begat Joseph the husband of Mary, of whom was born Jesus, who is called Christ.”
The dilemma
So the doctrine meets a fork. If sin passes from every parent to every child, then Mary carried it, and so did the son born of her flesh. Job asks, "Who can bring a clean thing out of an unclean? not one", and "how can he be clean that is born of a woman?" But if Jesus took nothing from Mary's flesh, then he was not of David's seed "according to the flesh", and the prophecies Christians apply to him lose their footing. Either way, one of the two beliefs has to give.
“Who can bring a clean thing out of an unclean? not one.”
“How then can man be justified with God? or how can he be clean that is born of a woman?”
“Concerning his Son Jesus Christ our Lord, which was made of the seed of David according to the flesh;”
The answer of 1854
The Catholic Church's answer is that Mary was preserved from original sin from the first moment of her conception. Pope Pius IX defined this as dogma on 8 December 1854. The Catholic Encyclopedia of 1910 admits that no direct or categorical proof of it can be brought from Scripture. In Luke, Mary herself rejoices in "God my Saviour". Most Protestants reject the doctrine.
Says that in the Constitution Ineffabilis Deus of 8 December 1854, Pope Pius IX defined that the Virgin Mary, in the first instant of her conception, by a singular privilege and grace of God, was preserved free from all stain of original sin. On Scripture it says that no direct or categorical and stringent proof of the dogma can be brought forward from it.
“And Mary said, My soul doth magnify the Lord, And my spirit hath rejoiced in God my Saviour.”
No one is born guilty
Islam has no original sin, so it has no such problem. The Prophet (ﷺ) said every child is born on the fitra, the natural state of believing in one God (﷾). The Qur'an says no bearer of burdens bears the burden of another, and the Bible's own prophet says the son shall not bear the iniquity of the father. The Qur'an tells how Mary's mother asked Allah (﷾) to protect her and her offspring from Satan. The Prophet (ﷺ) said every newborn is touched by Satan at birth, except Mary and her son.
Abu Hurayra reports that the Prophet (ﷺ) said every child is born upon the fitra, the true faith, and it is his parents who make him a Jew, a Christian or a Magian, just as an animal gives birth to a whole young one: do you see any of them born mutilated?
“Say: "Shall I seek for (my) Cherisher other than Allah, when He is the Cherisher of all things (that exist)? Every soul draws the meed of its acts on none but itself: no bearer of burdens can bear the burden of another. Your goal in the end is towards Allah: He will tell you the truth of the things wherein ye disputed."”
“The soul that sinneth, it shall die. The son shall not bear the iniquity of the father, neither shall the father bear the iniquity of the son: the righteousness of the righteous shall be upon him, and the wickedness of the wicked shall be upon him.”
“When she was delivered, she said: "O my Lord! Behold! I am delivered of a female child!"- and Allah knew best what she brought forth- "And no wise is the male Like the female. I have named her Mary, and I commend her and her offspring to Thy protection from the Evil One, the Rejected."”
Abu Huraira reports that the Prophet (ﷺ) said: Satan touches every child of Adam at birth, and so the newborn cries out, except Mary and her son. Abu Huraira then recited the prayer of Mary's mother in Qur'an 3:36, asking protection for her and her offspring from Satan.
Perspectives
Christian
Catholics say Mary was preserved from original sin, so Jesus received none from her. Some Protestants say original sin passes through the father, and Jesus had no human father.
Mary was preserved from original sin from her conception, so she passed none to Jesus.
Rebuttal
This became dogma only in 1854, and the Catholic Encyclopedia admits no direct proof of it can be brought from Scripture. In Luke, Mary calls God "my Saviour". And if God (﷾) could keep Mary from inherited sin, He could keep every child from it.
Original sin passes through the father, and Jesus had no human father.
Rebuttal
The verse Christians quote for inherited sin names the mother: "in sin did my mother conceive me". Job asks how anyone "born of a woman" can be clean. And Paul ties Jesus to David "according to the flesh", which can only be through Mary.
The Islamic perspective
No one inherits another's sin. Every child is born pure, Mary and Jesus were protected from Satan at birth, and the dilemma of inherited sin does not arise.
Paul says Jesus was of David's seed according to the flesh, which could only be through Mary.
The Immaculate Conception was defined as dogma in 1854. The Catholic Encyclopedia admits there is no direct proof of it in Scripture.
The Prophet (ﷺ) said every child is born on the fitra.
The Qur'an says no one bears another's burden.