Numbers 15:27-31 (RSV) “If one person sins unwittingly, he shall offer a female goat a year old for a sin offering.  And the priest shall make atonement before the LORD for the person who commits an error, when he sins unwittingly, to make atonement for him; and he shall be forgiven.  You shall have one law for him who does anything unwittingly, for him who is native among the people of Israel, and for the stranger who sojourns among them.  But the person who does anything with a high hand, whether he is native or a sojourner, reviles the LORD, and that person shall be cut off from among his people.  Because he has despised the word of the LORD, and has broken his commandment, that person shall be utterly cut off; his iniquity shall be upon him.”
Leviticus 18:26, 29 But you shall keep my statutes and my ordinances and do none of these abominations, . . .  For whoever shall do any of these abominations, the persons that do them shall be cut off from among their people.
Ezekiel 45:20 You shall do the same on the seventh day of the month for any one who has sinned through error or ignorance; so you shall make atonement for the temple. (cf. Acts 3:17; 17:30; Rom 10:3; 1 Tim 1:13; 1 Pet 1:14)
Luke 23:34 And Jesus said, “Father, forgive them; for they know not what they do.” . . .
Hebrews 10:26 For if we sin deliberately after receiving the knowledge of the truth, there no longer remains a sacrifice for sins,
Confession and penance are also alluded to:
Leviticus 5:5, 16-18 When a man is guilty in any of these, he shall confess the sin he has committed, . . .  He shall also make restitution for what he has done . . .  If any one sins, doing any of the things which the LORD has commanded not to be done, though he does not know it, yet he is guilty and shall bear his iniquity.  He shall bring to the priest a ram without blemish out of the flock, valued by you at the price for a guilt offering, and the priest shall make atonement for him for the error which he committed unwittingly, and he shall be forgiven.
Numbers 5:7 he shall confess his sin which he has committed; and he shall make full restitution for his wrong, adding a fifth to it, and giving it to him to whom he did the wrong.
The Bible plainly teaches that there is such a thing as a mortal sin (1 John 5:16-17), and often refers to lesser and greater sins, thus supporting Catholic theology. People are not always completely aware that certain acts or thoughts are sinful. In Catholic theology, in order to commit a grave, or mortal sin, where one ceases to be in a state of grace and is literally in potential, but real danger of hellfire, three requirements are necessary: 1) it must be a very serious matter, 2) the sinner has to have sufficiently reflected on, or had adequate knowledge of the sin, and 3) he must have fully consented in his will.
The above distinction between “unwitting sin” or “error” committed by a person who “does not know” is distinguished from sin “with a high hand”: done by person who “reviles the LORD”, and “has despised the word of the LORD”. This scenario is precisely analogous to the Catholic notion, insofar as the more serious sin caused the person to be “cut off” from the congregation of Israel: the usual OT concrete expression of what in Catholicism is understood in the spiritual sense as being cut off from God’s grace and communion with Him (and possibly from salvation and heaven in the long run).
Many other passages express the same notions, referring to sins committed “unwittingly” (Lev 4:2, 13, 22, 27; Lev 5:15, 18; 22:14; Num 15:24, 27-29; Josh 20:3, 5; Tobit 3:3) which are “forgiven” (Lev 4:20, 26, 31, 35; 5:10, 16, 18; Num 15:25-26, 28) through the usual processes of priestly sacrifice and atonement, based on the Law of Moses.
Dialogue on Mortal & Venial Sin [4-14-06]
What the Bible Says on Degrees of Sin and Mortal Sin [National Catholic Register, 7-6-18]
Summary: The Old Testament has several striking passages (especially Numbers 15:27-31), indicative of the Catholic & New Testament distinction between mortal & venial sin.