Tech start-up Calif used artificial intelligence to uncover a critical security flaw in Java, the world's third-largest programming language, that had existed for over a decade. The vulnerability, called Java4Shell, allows an adversary to remotely execute unwanted commands to Java's memory system.

Java is used by 90% of Fortune 500 companies including Apple and Amazon, as well as banks, hospitals and governments. Nearly every critical sector including banking, national security systems, aviation and telecommunications relies on Java.

Oracle, which owns Java, has not acknowledged the bug but released a "critical patch update" on Tuesday containing security vulnerability fixes. It remains unclear if any platforms or companies have been affected.

Toby Walsh, a computer scientist and AI researcher, told the BBC that the flaw is serious because Java is specifically designed to manage and protect memory. "This is why this is such an unlikely and serious flaw," Walsh said. The PHP programming language, also identified by Calif earlier, contained a similar vulnerability that went undetected for at least a decade and affected some 30 million websites.

Walsh noted that "AI is now exposing more flaws much more quickly," including ones that may have been too obscure for humans to discover alone. Cyber-security expert Dr Pedram Hayati said the Java flaw could compromise "critical financial systems, customers and organisation's data."