Germany's overconfidence in Enigma.
I found a stash of books in my attic that I read 25-30 years ago and I'm re-reading Freddy Winterbotham's "The Ultra Secret". At one point in the war, Germany, figured out Britain's code but fortunately, the British sensed that this had happened and changed it rather quickly. What worried them however, was the fact that some messages would of been intercepted giving pretty detailed info to HMS ships about U-boat locations that had been determined by Ultra. At that time, they figured the Germans would surely realize that their code had been broken and take appropriate action. Seems they where so confident that it was unbreakable that they never even looked in that direction to try and figure out where the leaks where coming from.
Pretty interesting book and there's a bit discussing how the breaking of Germany's enigma code shortened the war by at least one year with some estimates figuring 3 years was more likely.