The 1977 agreement.
1. A mercenary shall not have the right to be a combatant or a prisoner of war.
2. A mercenary is any person who:
(a) is specially recruited locally or abroad in order to fight in an armed conflict;
(b) does, in fact, take a direct part in the hostilities;
(c) is motivated to take part in the hostilities essentially by the desire for private gain and, in fact, is promised, by or on behalf of a Party to the conflict, material compensation substantially in excess of that promised or paid to combatants of similar ranks and functions in the armed forces of that Party;
(d) is neither a national of a Party to the conflict nor a resident of territory controlled by a Party to the conflict;
(e) is not a member of the armed forces of a Party to the conflict; and
(f) has not been sent by a State which is not a Party to the conflict on official duty as a member of its armed forces.
The 1989 agreement.
Article 1 of the 1989 UN Mercenary Convention defines a mercenary as:
1. Any person who:
(a) is specially recruited locally or abroad in order to fight in an armed conflict;
(b) is motivated to take part in the hostility essentially by the desire for private gain and, in fact, is promised, by or on behalf of a party to the conflict, material compensation substantially in excess of that promised or paid to combatants of similar rank and functions in the armed forces of that party;
(c) is neither a national of a party to the conflict nor a resident of territory controlled by a party to the conflict;
(d) is not a member of the armed forces of a party to the conflict; and
(e) has not been sent by a State which is not a party to the conflict on official duty as a member of its armed forces.
2. A mercenary is also any person who, in any other situation:
(a) is specially recruited locally or abroad for the purpose of participating in a concerted act of violence aimed at:
(i) overthrowing a Government or otherwise undermining the constitutional order of a State; or
(ii) undermining the territorial integrity of a State;
(b) is motivated to take part therein essentially by the desire for significant private gain and is prompted by the promise or payment of material compensation;
(c) is neither a national nor a resident of the State against which such an act is directed;
(d) has not been sent by a State on official duty; and
(e) is not a member of the armed forces of the State on whose territory the act is undertaken
When a Russian citizen who is a prisoner for a civil crime who then was recruited by Wagner, not the Russian government, to fight against Ukraine, that Russian citizen would fall under 1989 agreement section 2.
What distinguished the French Foreign Legion from the Wagner Group is that the Legion is an official branch of the French military. The Wagner Group is no such member in the Russian military.