Mr Corbyn was criticised for attending a wreath-laying ceremony at the Palestinian Martyrs’ Cemetery in Tunis in 2014.
The cemetery contains the graves of a number of the founders of the Black September terror group, which carried out the 1972 Munich Olympic massacre in which 11 Israeli athletes were murdered.
A spokesman for Mr Corbyn said that he had attended a wreath-laying ceremony to pay tribute to the victims of a 1985 airstrike and to promote peace in the Middle East.
DeVito, 73, said: “That’s the kind of thing that’s dug up by everybody to, ‘you know this guy is doing something that we don’t want and let’s figure out a way to make him look bad in front of everybody’.
“We all know that, that’s Hollywood, that’s the way it happens in Hollywood, the same way it happens in politics. You do something, people go, ‘let’s attack this guy for something that happened 25 years ago’.”
DeVito endorsed Mr Corbyn during the 2017 general election and said he is “absolutely” still a fan of the politician.
DeVito, a veteran actor known for starring in films including Twins and Matilda, warned if more “progressives” are not voted into office, “we are going to be in the s*****r pretty soon”.
DeVito was speaking in Los Angeles at the series 13 premiere of the US sitcom It’s Always Sunny In Philadelphia, in which he stars.
Asked if it was difficult to keep the show funny after 13 years, DeVito said: “It’s not a challenge, I love doing it”.