A double agent
pretends to spy on a target organization on behalf of a controlling organization, but in fact is loyal to the target organization. Double agents may be agents of the target organization who infiltrate the controlling organization, or may be previously loyal agents of the controlling organization who have been captured and turned
by the target.
Double agents are often used to transmit disinformation or to identify other agents as part of counter-espionage operations.