CWE-15: External Control of System or Configuration Setting
Description
One or more system settings or configuration elements can be externally controlled by a user.
Submission Date :
July 19, 2006, midnight
Modification Date :
2023-06-29 00:00:00+00:00
Organization :
MITRE
Extended Description
Allowing external control of system settings can disrupt service or cause an application to behave in unexpected, and potentially malicious ways.
Example - 1
The following Java code snippet reads a string from an HttpServletRequest and sets it as the active catalog for a database Connection.
...conn.setCatalog(request.getParameter("catalog"));...
In this example, an attacker could cause an error by providing a nonexistent catalog name or connect to an unauthorized portion of the database.
Example - 2
The following C code accepts a number as one of its command line parameters and sets it as the host ID of the current machine.
...sethostid(argv[1]);...
Although a process must be privileged to successfully invoke sethostid(), unprivileged users may be able to invoke the program. The code in this example allows user input to directly control the value of a system setting. If an attacker provides a malicious value for host ID, the attacker can misidentify the affected machine on the network or cause other unintended behavior.
Related Weaknesses
This table shows the weaknesses and high level categories that are related to this weakness. These relationships are defined to give an overview of the different insight to similar items that may exist at higher and lower levels of abstraction.
Visit http://cwe.mitre.org/ for more details.