Scientists have developed a test to detect even the smallest traces of nuts in food.
The test could detect a protein found in walnuts
US researchers found certain proteins indicate the presence of nuts.
Writing in the Journal of the Science of Food and Agriculture, they say the test could lead to more accurate food labelling for consumers.
And they say the test could also allow manufacturers to check for cross-contamination, cutting the risk of products being recalled.
Reports from the US Food and Drug Administration showed that out of 659 product recalls in 1999, 236 were due to the foods containing one or more allergens which were not highlighted on the packaging.
It was consumers themselves who identified the allergens and alerted the manufacturers.
The researchers from Florida State University and the University of California were originally looking for ways of processing nuts to make them safe for allergy sufferers.
Previous research had identified almond major protein (AMP), cashew major protein (CMP) and walnut glutelin (WG).
In this study, the team tried to change these proteins and reduce the allergic properties of the nuts by subjecting them to gamma radiation and thermal processing.
While they failed in that aim, they did discover the proteins could be used to detect raw and processed nuts.
Professor Shridhar Sathe of Florida State University, who worked on the study said more research was needed before the tests could be made widely available.
"The development of specific, reliable, sensitive and accurate tests for allergy-related proteins has significant implications for the food industry and for consumers who daily rely on accurate labelling.
"Therefore continued and vigorous research is urgently warranted."
David Reading, director of the Anaphylaxis Campaign, told BBC News Online: "The labels which warn 'may contain nuts' cause huge frustration and anger amongst allergy sufferers.
"People are frustrated that their choice of foods is whittled down. It isn't just sweets and cereals which can be affected, as you may think, it's foods such as cheese and wrapped salads.
"So we would welcome anything that could address this problem.
"But of course, a test would have to be foolproof to ensure people with severe allergies did not come into contact with even traces of nuts."