While women are still officially not allowed in combat in almost all nations, there is a long history of female involvement in warfare, even in ancient times. Espionage knows no gender and in fact being female could provide less suspicion and a better cover. There is extensive documentation of the role of women undercover and otherwise involved in intelligence work in the two world wars and some very interesting characters emerge from those two conflicts.
World War I
If asked to name a female spy, probably most people would be able to cite Mata Hari of World War I fame. Her real name was Margaretha Geertruida Zelle McLeod, born in the Netherlands but who posed as an exotic dancer who was supposed to come from India. While there is little doubt about Mata Hari's life as a stripper and a sometimes prostitute, there is actually some controversy about whether she was ever actually a spy. Famous as she was, if she was a spy she was fairly inept at it, and she was caught as the result of an informant and executed by France as a spy. It later became known that her accuser was himself a German spy and that her real role was in doubt. Likely she is remembered both for being executed and for having a memorable name and profession.
Another spy famous from World War I was also executed as a spy. Her name was Edith Cavell and she was born in England and was a nurse by profession. She was working in a nursing school in Belgium when the war erupted and although she was not a spy as we generally see them, she worked undercover to help soldiers from France, England and Belgium escape from the Germans. At first she was allowed to continue as matron of a hospital and, while doing so, helped at least 200 more soldiers to escape. When the Germans realized what was happening she was put on trial for harboring foreign soldiers rather than for espionage and convicted in two days. She was killed by a firing squad in October of 1915 and buried near the execution site despite appeals from the United States and Spain.
After the war her body was removed back to England and buried in her native land after a service in Westminster Abbey led by King George V of England. A statue erected in her honor in St, Martin's Park carries the eloquent epitaph of "Humanity, Fortitude, Devotion, Sacrifice." The statue also carries the quote she gave to the priest who gave her communion the night before her death, "Patriotism is not enough, I must have no hatred or bitterness towards anyone." She had in her life cared for anyone in need, regardless of which side of the war they were on, out of religious conviction, and died as valiantly as she had lived.