According to John Riddle in "Ancient and Medieval Chemotherapy for Cancer," Isis 73 (3): 313-330:
Of all the classical authorities, only Dioscorides appears to have recognized the actions of plant alkaloids. First he grouped them together by drug affinities: for example, he put plants containing the papaverine alkaloids in one group and those containing tropane alkaloids in another. Second, he employed many of the same plants that we have rediscovered and currently emp0loy. Many of those alkaloids he said were good as antitumor agents. One such plant is the squirting cucumber (Ecballium elaterium L.). In 1958 a chemical compound from this plant was found to have "strong antitumor activity against sarcoma." . . . Although the plant was not widely employed* against tumors [in the late Classical and medieval periods] . . . , the continuous reliance on the authority of Dioscorides makes it nonetheless likely that there was occasional use of the plant for cancer treatments. this remedy has persisted in folk medicine, so that modern investigators learned in 1952-1952 that the squirting cucumber was taken orally for cancer.
*Note: the fact that squirting cucumber was not mentioned in later sources doesn't mean it was not in use. Dioscorides' Materia Medica was frequently copied and widely available throughout the middle ages, so instructions for use of squirting cucumber could easily have been transmitted continually from copies of the original source from the first century on into the Renaissance and beyond.