A federal judge in Newark, N.J., has ruled plaintiffs can pursue a class action suit alleging that Johnson & Johnson and Wal-Mart baby bath products are unfit for sale because they contain a banned chemical that could cause cancer.

U.S. District Judge Dennis Cavanaugh denied the companies’ motions to dismiss for failure to state a claim, saying the plaintiffs had made a good enough case to seek economic damages on theories that the companies committed deceptive trade practices and breached an implied warranty.