The Texans announced the signing on Monday.
''We were very happy to be able to get something done,'' coach and general manager Bill O'Brien said. ''Zach's a really good football player, a very important part of our team ... he's a dependable player, he's a tough player, he's a smart player and ... he does a lot for us.''
The 25-year-old Cunningham was a second-round draft pick in 2017 and ranked second in the NFL last season with a career-high 137 tackles. His 137 tackles were the fourth most in franchise history.
Cunningham also set career highs in several other categories last season, including tackles for losses (seven), fumble recoveries (two), sacks (two) and quarterback hits (three).
Cunningham was in the last year of the contract he signed as a rookie and the new deal will keep him with the Texans through the 2024 season.
Cunningham has appeared in 46 games with 43 starts in his three-year career. He has 324 tackles with 15 tackles for losses, seven quarterback hits, 3+ sacks, three forced fumbles, three fumble recoveries and one interception returned for a touchdown.
His 324 tackles in his first three seasons rank second in franchise history.
More AP NFL: https://apnews.com/NFL and https://twitter.com/AP-NFL