Description
The product uses low-level functionality that is explicitly prohibited by the framework or specification under which the product is supposed to operate.
The use of low-level functionality can violate the specification in unexpected ways that effectively disable built-in protection mechanisms, introduce exploitable inconsistencies, or otherwise expose the functionality to attack.
Potential Impact
Other
Other
Demonstrative Examples
class Echo {
public native void runEcho();static {
System.loadLibrary("echo");
}public static void main(String[] args) {
new Echo().runEcho();
}
}#include <jni.h>#include "Echo.h"//the java class above compiled with javah#include <stdio.h>
JNIEXPORT void JNICALLJava_Echo_runEcho(JNIEnv *env, jobject obj){char buf[64];gets(buf);printf(buf);}public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// Perform servlet tasks.
...
// Open a socket to a remote server (bad).
Socket sock = null;
try {
sock = new Socket(remoteHostname, 3000);
// Do something with the socket.
...
} catch (Exception e) {...}
}Detection Methods
- Automated Static Analysis High — Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then sea
Related Weaknesses
Frequently Asked Questions
What is CWE-695?
CWE-695 (Use of Low-Level Functionality) is a software weakness identified by MITRE's Common Weakness Enumeration. It is classified as a Base-level weakness. The product uses low-level functionality that is explicitly prohibited by the framework or specification under which the product is supposed to operate.
How can CWE-695 be exploited?
Attackers can exploit CWE-695 (Use of Low-Level Functionality) to other. This weakness is typically introduced during the Implementation phase of software development.
How do I prevent CWE-695?
Follow secure coding practices, conduct code reviews, and use automated security testing tools (SAST/DAST) to detect this weakness early in the development lifecycle.
What is the severity of CWE-695?
CWE-695 is classified as a Base-level weakness (Medium abstraction). Its actual severity depends on the specific context and how the weakness manifests in your application.