From my research, it seems that cross-contamination from modern peoples has been all but ruled out, and the same mummies have been tested by different peoples and by different methods.
How did ancient Egyptians do drugs that are native to the western hemisphere?
https://blog.cansfordlabs.co.uk/hair-testing-cocaine-mummies-real-or-fake
This ends up being a story more about modern science and conspiracy theories than it does ancient Egypt.
Typing "cocaine mummies" on Youtube, the second video I see gives the title "COCAINE MUMMIES Discovery Proves COLUMBUS NOT FIRST TO AMERICAS" which is a statement so wrong and confused if we were on /r/HistoryMemes rather than /r/AskHistorians we would have to use the dreaded double facepalm (for when one facepalm does not cut it).
(1. what happened to the Norse? 2. there were most definitely people in the Americas before the Norse 3. you can refer to this epic list of prior AskHistorians answers compiled by /u/Mictlantecuhtli if Africa had pre-Columbian contact, short answer is no)
Where the "cocaine mummies" got popularized was a 1996 documentary called Secret of the Cocaine Mummies.
NARRATOR:
Why was the mere contemplation of voyages before Columbus or the Viking crossings to America, thought to be some sort of curse?
It was in 1910 that some early anthropologists began to theorize that the stepped pyramids in Mexico might not have been the invention of the American Indians. Could the technology have come from the other side of the Atlantic Ocean, from Egypt, where there were also stepped pyramids?
(Again, very much no. At least, mercifully, the documentary does not talk about aliens.)
Now, the detection was somewhat legitimate: a set of mummies circa roughly 1000 BCE unwrapped for the Munich Mummy Project (mummies formerly owned by the King of Bavaria, probably Ludwig 1) tested positive for both for cocaine (Parsche et. al, 1993) and nicotine (both the Parsche paper and also Cartmell, 1991 and 2001).
It'd be nice to have some sort of comparison with mummies from the Americas, and fortunately, we do: cocaine and nicotine have also been detected in Peruvian mummies.
This sounds nicely tantalizing, but let's take what's the more boring of the two first: cocaine. It was detected (using hair) in the Parsche paper at a range of 0.024 - 0.2 ng/mg (that's nanograms per milligram) for the Egyptian mummies, and 0.22 - 13.9 ng/mg for the Peruvian ones. That's a significant difference -- the Peruvian level definitely is consistent with that of ingesting coca leaves (which have about 0.1% to 0.9% cocaine) and it is still used by indigenous groups for medicine. The Egyptian level is consistent with ... nothing in particular, as it is below the cutoff for some labs, and the Cartmell paper detected the cocaine level at nil. Other Egyptian mummies have also been tested and found no cocaine. Extraordinary claims need re-testing, and there isn't anything other than cocaine that would cause benzoylecgonine, and historically speaking we know there wasn't pre-Columbian contact in Africa, so cherry-picking the result you want and ignoring the nil result is not an act done in good faith.
Now, nicotine! That's a bit more interesting. Just to lay everything out at once:
Peruvian hair: 0.028-1.4 ng/mg (Parsche)
Egypt: 0.14-0.9 ng/mg (Parsche), 0.7-2.2 ng/mg (Cartmell)
If anything, it looks like there's slightly more nicotine amongst the Egyptians. However, that doesn't mean tobacco! They're at ingestion levels. There are at least 23 nicotine-containing plants, including Apium graveolens, known and eaten by the Egyptians, also known as celery.
So, in summary:
1.) cocaine detection is very low, nil in the case of one experiment, and no other Egyptian mummies registered cocaine in any test
2.) nicotine not at tobacco use level, but eaten, and it probably came from celery
(ADD: THERE IS NOW A PART 2)
...
Cartmell, L. W., Aufderheide, A. C., Springfield, A., Weems, C., Arriza, B. 1991. ‘The frequency and antiquity of prehistoric coca leaf chewing practices in Northern Chile: radioimmunoassay of a cocaine metabolite in human mummy hair,’ Latin American Antiquity 2(3): 260–268.
Cartmell, L. W., Weems, C. 2001. ‘Overview of hair analysis: a report of hair analysis from Dakhleh Oasis, Egypt,’ in Chungara, Revista de Antropologia Chilena 33(2): 289–292.
David, R. (2008). Egyptian Mummies and Modern Science. Cambridge University Press.
Parsche, F., Balabanova, S., Pirsig, W. (1993). ‘Drugs in ancient populations,’ The Lancet 341: 503
Peters, K. E., Peters, K. E., Moldowan, J. M., Walters, C. C. (2005). The Biomarker Guide. Cambridge University Press.
it seems that cross-contamination from modern peoples has been all but ruled out
Can we rule out that possibility decisively? I would like to highlight an article “Rameses II and the Tobacco Beetle” by Buckland and Panagiotakopulu published in Antiquity in 2001 which discusses the discovery of tobacco in the abdominal cavity of the mummy of Rameses II. They point out that after his death, Rameses II was moved around quite a lot – he was relocated to two different tombs during the New Kingdom period, he was exhumed in 1883 and moved multiple times before ending up in the National Museum of Cairo. During this time his mummy was subjected to many different conservators and subjected to dangers like insect infestation. Good records pertaining to the conservation of mummies like that of Rameses only go back some 50 years and many specimens aren’t as well documented as Rameses. At any given point between that long interlude mummification and proper record keeping, the possibility for contamination could have crept in. Buckland and Panagiotakopulu point out that one way of combatting insect infestation was to treat the mummy with insecticidal agents which included those derived from tobacco. Their working theory for the nicotine found in Rameses and other mummies is that they were treated with tobacco-based pesticides in the 19th century; cigarette smoke from careless archaeologists and museum workers could also be another source of these agents.
They do discuss alternatives like Pre-Columbian contact with the New World or even an Old World source of Nicotiana/tobacco (though they are dismissive of these). Their explanation for cocaine is less well developed (they posit some sort of contamination in the 19th century when cocaine was a legal stimulant). Their broader point is to consider the post-exhumation histories of the mummies when considering anomalous biological agents .