In John’s Gospel (13:18), the lamenting words of the psalmist concerning betrayal by an intimate friend are used by Jesus in anticipation of his own betrayal [“I am not speaking of all of you; I know whom I have chosen. But it is to fulfill the scripture, ‘The one who ate my bread has lifted his heel against me'” (Ps. 41:9)]. Thus, words which were originally part of a liturgy of sickness in the face of death, are transformed into what amounts to a prophetic prediction of betrayal in the life of Jesus.
PETER C. CRAIGIE AND MARVIN TATE, PSALMS 1-50, VOLUME 19: SECOND EDITION (WORD BIBLICAL COMMENTARY), 321.