Hi Juan:
Chameleons can get cancer although it doesn't seem to be as widespread as in mammals. I have seen a few cases of cancer in the extremities and body of chameleons and most of them, if caught on time, can be removed with no problems and no recurrence. Liver cancer I have not encountered yet but I wouldn't doubt it is out there. Cancer by itself is not transmitted from animal to animal unless it is caused by viruses or secondary problems like nutritional deficiencies in which all the animals are affected.
Once you get the results from the laboratory that your Vet submitted the liver sample to, you will have a better chance of knowing what could have caused the cancer. Sometimes it is not unusual to find visceral gout in chameleons which causes white deposits and/or nodules on the organs and it might look like cancer. The results will tell you what was found and what to expect.
Keep me posted on the results.
Thanks,
Ivan