Nokia has announced an investigation into a potential security breach involving a third-party contractor after a well-known hacker claimed to have stolen source code.