A very effective general stain remover is a mixture of 2 tablespoons of salt and a cup of white vinegar.
Varnish stain on carpet.
Vacuum or blot up the excess.
Let the area dry and then vacuum the area.
If what you have available is pure ammonia work more cautiously and dilute a teaspoon into in a cup of water before dabbing it onto your carpet.
If the stain remains repeat the process but add 2 tablespoons of borax to the mixture.
Oil based paint stains are more difficult to remove so it may take a while to fully dissolve the pigment.
Rinse the carpet by applying warm water without soaking the carpet.
This will give the solvent time to dissolve the varnish.
Wet a cleaning cloth with a bit of paint cleaner and start blotting the area.
Then press the damp material against the carpet repeatedly blotting up the stain as you go.
100 acetone or hydrogen peroxide are suitable alternatives if you do not have paint cleaner available.
Apply vinegar mix to the stained area without soaking the carpet.
Apply the mixture to the stain with a cloth.
Do not rub the carpet as this may cause the stain to spread.
Continue blotting until the stain begins to break down and dissolve.
Blot or gently stroke the carpet pile.
Watch for loss of color.
Spray the stain and use a clean cloth to blot it up as the stain begins to loosen and lift from the carpet fibers.
Place the towel over the stain and allow it to rest for five to 10 minutes.