Before we can answer this question, we need to know what the term, "original sin," means. This is a term used to describe the effect of Adam's sin on his descendants (Rom. 5:12-14). Specifically, it is our inheritance of a sinful nature from Adam. The sinful nature originated with Adam and is passed down from parent to child. We are by nature children of wrath (Eph. 2:3). So, if we inherit our sinful nature from our parents, then Jesus, who had Mary as a parent, must have had a sin nature. Right? Not necessarily. I believe that the sin nature is passed down through the father. Let me explain.
Some Bible commentators with whom I agree hold the position that the sin nature is passed down through the father. Support for this position is found in the fact that sin entered the world through Adam, not Eve. Remember, Eve was the one who sinned first. However, sin did not enter the world through her. It entered through Adam. Rom. 5:12 says, "Therefore, just as through one man sin entered into the world, and death through sin, and so death spread to all men, because all sinned." The concept behind this is called Federal Headship. This means that a person (a father) represents his descendants. We see this concept taught in Heb. 7:9-10, "And, so to speak, through Abraham even Levi, who received tithes, paid tithes, 10 for he was still in the loins of his father when Melchizedek met him." We see in Hebrews that Levi, a distant descendant of Abraham, is said to have paid tithes to Melchizedek when Abraham was the one offering the tithes, not Levi. What this means is that there is Biblical support for the idea that the sin nature was passed down through the father. Since Jesus had no literal, biological father, the sin nature was not passed down to Him. However, since He had a human mother, He was fully human but without original sin. Jesus has two natures: God and man. Col. 2:9 says, "For in Him dwells all the fullness of deity in bodily form." Jesus received His human nature from Mary, but He received His divine nature through God the Holy Spirit. Therefore, Jesus is both God and man. He was sinless, had no original sin, and was both fully God and fully man.