The Java Native Interface (JNI) can render Java applications vulnerable to security flaws in other languages. Errors occur when a Java application uses JNI to call code written in another programming language. The vulnerability in the example above could easily be detected through a source code audit of the native method implementation. The ability to share objects between Java and native methods expands the potential risk to much more insidious cases where improper data handling in Java may lead to unexpected vulnerabilities in native code or unsafe operations corrupt data structures in Java.”]
Source: https://owasp.org/www-community/vulnerabilities/Unsafe_JNI

