Giants right-hander Matt Cain avoided serious injury Sunday after being struck on the right knee by a ball hit by Alfonso Soriano of the Chicago Cubs.