(CNN) Cruise ships generate high levels of air pollution that could endanger the health of passengers, staff and port communities, according to an undercover report released Thursday.

On the decks of the four Carnival Corp. cruise ships studied over a two-year period, concentrations of particulate matter measured were "comparable to concentrations measured in polluted cities, including Beijing and Santiago," according to Ryan Kennedy, author of the report and an assistant professor at Johns Hopkins University Bloomberg School of Public Health.

Ship exhaust contains harmful constituents, including metals and polycyclic aromatic hydrocarbons, many of which have toxic, possibly cancer-causing properties, Kennedy said: "It's dangerous it's not a healthy thing for us to be exposed to."

The vessels on which Kennedy took measurements were Carnival Liberty sailing from Florida to the Bahamas; Carnival Freedom sailing from Texas to the Caribbean; Holland America MS Amsterdam sailing from Vancouver to Los Angeles; and Princess Cruises Emerald Princess sailing from Los Angeles to Mexico. (Holland American and Princess Cruises are subsidiaries of Carnival Corp.)

Without the knowledge of the company or ship staff, Kennedy took measurements using a P-TRAK Ultrafine Particle Counter when the ships were docked as well as when moving at sea.