The rosemary extract might be legal it depends on what the extract contains
This may help explain https://en.wikipedia.org/wiki/Extract
To make an extract you need a solvent. For example: in vanilla extract the solvent is usually alcohol.
The extract in this product may have the solvent evaporated. Can you ask the company?