Do you have access to carpet cleaning equipment? It might just rinse out with fresh water, but you would need an extractor.
Pressing a damp cloth against it will tell you a lot, lipstick is quite thick so a lot of it with just transfer on a cloth pressed against it, start diluting it and it could penetrate deeper into the fibre.
Probably not want you want to hear but paying a proffesional to remove it might be better than DIY attempts, it depends on the value of the carpet and it's condition.
If you go down the DIY route then get the offending lipstick and practice with it to see how it reacts to different shop bought spotters (Mark up an inconspicuous part of the carpet or an off cut and practice)