The burning acid behind ant stings was spotted around two stars

Sign up for CNN’s Wonder Theory science newsletter. Explore the universe with news on fascinating discoveries, scientific advancements and more.

Astronomers using the James Webb Space Telescope have detected commonplace chemical ingredients found in vinegar, ant stings and even margaritas around two young stars, according to NASA.

The complex organic molecules they observed using the space observatory’s Mid-Infrared Instrument included acetic acid, a component of vinegar, and ethanol — otherwise known as alcohol.

The team also found simple molecules of formic acid, which causes the burning sensation associated with ant stings, as well as sulfur dioxide, methane and formaldehyde. Scientists think sulfurous compounds such as sulfur dioxide might have played a key role on early Earth that eventually paved the way for life to form.

The newly detected molecules were spotted as icy compounds surrounding IRAS 2A and IRAS 23385, which are two protostars, or stars so young they have not yet formed planets. Stars form from swirling clouds of gas and dust, and the leftover material from star formation gives rise to planets.

The protostar IRAS 23385 is estimated to be 15,981 light-years from Earth in the Milky Way, according to previous research.

The new observation intrigues astronomers because the molecules detected around the stars could be crucial ingredients for potentially habitable worlds, and those ingredients could be incorporated into the planets that will likely eventually form around the stars.

Space is full of heavy metals and chemical elements and compounds that have been created and released by star explosions over time. In turn, the chemical elements become incorporated in clouds that form the next generation of stars and planets.

On Earth, the right combination of elements allowed life to form, and as famed astronomer Carl Sagan once said, “We are made of star-stuff.” But astronomers have long questioned just how common the elements necessary for life are across the cosmos.

The search for complex molecules in space

Previously, scientists using Webb discovered types of ice made of different elements in a cold, dark molecular cloud, an interstellar clump of gas and dust where hydrogen and carbon monoxide molecules can form. Dense clumps within these clouds can collapse to form protostars.

Detecting complex organic molecules in space is helping astronomers to determine the molecules’ origins as well as those of other larger cosmic molecules.

Webb's detections revealed simple and complex molecules that could be used to form potentially habitable worlds. - NASA/ESA/CSA/L. Hustak
Webb's detections revealed simple and complex molecules that could be used to form potentially habitable worlds. - NASA/ESA/CSA/L. Hustak

Scientists believe that complex organic molecules are created by the sublimation of ices in space, or the process when a solid changes to a gas without first becoming a liquid, and the new Webb detection lends evidence to that theory.

“This finding contributes to one of the long-standing questions in astrochemistry,” said Will Rocha, team leader of the James Webb Observations of Young ProtoStars program and a postdoctoral researcher at Leiden University in the Netherlands, in a statement. “What is the origin of complex organic molecules, or COMs, in space? Are they made in the gas phase or in ices? The detection of COMs in ices suggests that solid-phase chemical reactions on the surfaces of cold dust grains can build complex kinds of molecules.”

A study detailing the new protostar findings has been accepted for publication in the journal Astronomy & Astrophysics.

A peek at the early solar system

Understanding the form that complex organic molecules take can help astronomers better understand the ways that the molecules become incorporated in planets. Complex organic molecules trapped in cold ices can eventually become part of comets or asteroids, which collide with planets and essentially deliver ingredients that could support life.

The chemicals found around the protostars may mirror the early history of our solar system, allowing astronomers a way to look back at what was present when the sun and the planets that orbit it, including Earth, were forming.

“All of these molecules can become part of comets and asteroids and eventually new planetary systems when the icy material is transported inward to the planet-forming disk as the protostellar system evolves,” said study coauthor Ewine van Dishoeck, professor of molecular astrophysics at Leiden University, in a statement. “We look forward to following this astrochemical trail step-by-step with more Webb data in the coming years.”

The team has dedicated the results of their research to study coauthor Harold Linnartz, who died unexpectedly in December shortly after the paper’s acceptance for publication.

Linnartz, who led the Leiden Laboratory for Astrophysics and coordinated measurements used in the study, was a “world leader in laboratory studies of gaseous and icy molecules in interstellar space,” according to a release from Leiden University.

He was reportedly thrilled by the data Webb was able to capture, and what the findings might mean for astrochemistry research.

“Harold was particularly happy that in the COM assignments lab work could play an important role as it has been a long time getting here,” van Dishoeck said.

For more CNN news and newsletters create an account at CNN.com