The Cottagers are preparing for life back in the Premier League and want to strengthen their squad, while Hammers boss David Moyes is also keen to make a splash in the summer window.
Both clubs have taken a liking to Juventus left-back Pellegrini and are keen on a possible swoop to sign him.
The 23-year-old clocked 18 appearances in Serie A for Juventus last season, picking up six yellow cards in the process.
He could be on the move this summer though, with interest from two Premier League clubs.
Pellegrini came through the youth ranks at Italian giants Roma, but was snapped up by Juventus in 2019.
The defender was sent out on two consecutive loan stints by Juventus to speed his development, spending time at Cagliari and Genoa.
Juventus have Pellegrini, who has been capped once by Italy at senior international level, under contract until the summer of 2025.