Disinsection, the spraying of an aerosolized insecticide (with or without passengers on the plane) is permitted under international law. More than 50 countries require the use of disinsection methods for inbound flights. The airlines may use an aerosol spray with passengers on or off the plane. Alternatively, they may use a wipe when the passengers are not on the plane.
U.S. airlines are required, by law, to notify passengers, when purchasing a ticket, that the country may require the use of insecticides.