"Reflections on Trusting Trust" is a classic written by Ken Thompson of Unix fame. It discusses a sort of self-reproducing backdoor that could be made to a compiler. https://www.cs.cmu.edu/~rdriley/487/papers/Thompson_1984_ReflectionsonTrustingTrust.pdf