The situation you described is called “Force Majeure”, when due to unforeseen circumstances you are forced to divert your voyage. This happens quite a lot with ships at sea, they may have a mechanical breakdown or a medical emergency. This forces them to go into port, unplanned. Working offshore on an oil platform, I have seen this with helicopters, they are forced to land on our platform, due to a mechanical problem.
Underway your ship or plane follows the law of it’s home port, an American ship follows American law, but when you arrive at a foreign port you follow the local law. This applies to “Force Majeure”, once we were diverted due to an engine problem into Jeddah, Saudi Arabia. The local police boarded and searched our ship for pornography and liqueur. The liqueur was locked up, but all the pornography was seized, even though that was legal in the U.S.
So in answer to your question, yes if found they will seize any illegal drugs, but you probably won’t be charged, since it’s unlikely you would deplane or leave the immediate area of the airport.
- Do you think Boeing should build a new airplane with a single-aisle cabin 20 inches wider than the cabin of the 737?
- Why don't airlines check and maintain their wifi better?
- Can business jets be converted into airliners?
- Why are Indian airports (except for Mumbai's CSIA) aesthetically-challenged?
- What happens if someone else takes your luggage from the airport?
Force majeure – Wikipedia