One expert has described the leak as "the biggest in history" as it could help hackers develop attacks against iPhones.
The source code for one of the most secretive parts of the iPhone's operating system appears to have been leaked online.
It could provide hackers with a treasure trove of information they could use to design new attacks against Apple's operating system iOS.
The code has seemingly been taken from the "iBoot" part of the iOS, the part of the computer that begins to boot the operating system when it is turned on.
Although it is not yet known whether the code came from inside Apple, security researchers believe it is authentic.
Speaking to online technology publication Motherboard, Jonathan Levin, an expert on iPhone internal software, said: "This is the biggest leak in history. It's a huge deal."
Mr Levin told Motherboard that the code seemed to be legitimate as it matched his own efforts to reverse engineer the software that powers iPhones.
The code was for the outdated iOS 9, released in September 2015, but it is expected that parts of the code may still be in use underpinning the iPhone's security in later releases.
Although initially published to a repository on programming website GitHub, the code has now been replaced with a copyright notice - with some suggesting this may prove its authenticity.
Andy Kays, chief technology officer at British cybersecurity firm Redscan, told Sky News: "The release of the iBoot code demonstrates that vendors can't take it for granted that source code will always remain hidden.
"Vendors relying excessively on code obfuscation to maintain the security of their products will always be vulnerable to leaks."
Hi! I am a robot. I just upvoted you! I found similar content that readers might be interested in:
http://www.brexit-news.de/secret-iphone-operating-system-code-leaked-online/
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit