Thiosulfate compounds in the flesh of onions have been identified as the cause.
Thiosulfate-citrate-bile salts-sucrose agar, a selective media agar type used in microbiology for cholerae culture
In this application to photographic processing, discovered by John Herschel and used for both film and photographic paper processing, the sodium thiosulfate is known as a photographic fixer, and is often referred to as hypo, from the original chemical name, hyposulphite of soda.
Tetrathionate has also been found to serve as a terminal electron acceptor for Salmonella Typhimurium, whereas existing thiosulfate in the lumen of mammals is oxidized by reactive oxygen species released by the immune system (mainly NADPH oxidase produced superoxide) to form tetrathionate.