This expression has been around since at least the 1950s, although some web sites think it might have originated much earlier. There is no doubt the expression is used to describe, as explained by mentalfloss.com, to describe the impossible task of solving a problem that is equal to trying to identify one worm in a mass of worms. The result is “…more trouble than you bargained for.”