What caterpillar is this? found a couple of them on some flowers I received as a gift

I was gifted some flowers for valentines and quickly spotted 2 caterpillars on them, I have kept them on the flowers as I didn’t want to release them in case they are invasive but I’m struggling to ID them. Can anyone tell me what species they are? and if they’re safe to release?