External Control of System or Configuration Setting
One or more system settings or configuration elements can be externally controlled by a user.
Allowing external control of system settings can disrupt service or cause an application to behave in unexpected, and potentially malicious ways.
The following examples help to illustrate the nature of this weakness and describe methods or techniques which can be used to mitigate the risk.
Note that the examples here are by no means exhaustive and any given weakness may have many subtle varieties, each of which may require different detection methods or runtime controls.
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.
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.
The following Java code snippet reads a string from an HttpServletRequest and sets it as the active catalog for a database Connection.
In this example, an attacker could cause an error by providing a nonexistent catalog name or connect to an unauthorized portion of the database.
Weaknesses in this category are related to the design and architecture of a system's authorization components. Frequently these deal with enforcing that agents have th...
This category identifies Software Fault Patterns (SFPs) within the Tainted Input to Variable cluster (SFP25).
Weaknesses in this category are related to improper management of system state.
This view (slice) covers all the elements in CWE.
This view (slice) lists weaknesses that can be introduced during implementation.
This view (slice) displays only weakness base elements.