The foam is caused mostly by untreated household runoff from nearby São Paulo, the biggest city in Brazil, according to Malu Ribeiro, water-program coordinator for the local environmental nonprofit SOS Mata Atlântica. The runoff flows directly into the river via waste pipes, she added.
The organization has tracked the river's water quality since 1993, a few years after foam pollution was first detected. (How much do you know about the world's fresh water?)
The foam forms when water mixes with phosphate and phosphorus—ingredients found in products such as biodegradable detergents, Ribeiro said.
The phenomenon occurs in Brazil's June-to-August dry season, when lowered water levels make the pollutants more concentrated.
A severe drought made the foam especially abundant this past August, the driest month in Brazil since 1943, according to the country's National Institute of Meteorology.
Elsewhere in Brazil, arid conditions have also left the Amazon River at its lowest level in 47 years, according to the Agence France-Press news service.
—Sabrina Valle in Rio de Janeiro, Brazil