Common Weakness Enumeration

A Community-Developed List of Software Weakness Types

CWE/SANS Top 25 Most Dangerous Software Errors
Home > CWE List > CWE- Individual Dictionary Definition (2.11)  

CWE-234: Failure to Handle Missing Parameter

Weakness ID: 234
Abstraction: Variant
Status: Incomplete
Presentation Filter:
+ Description

Description Summary

If too few arguments are sent to a function, the function will still pop the expected number of arguments from the stack. Potentially, a variable number of arguments could be exhausted in a function as well.
+ Time of Introduction
  • Architecture and Design
  • Implementation
+ Applicable Platforms



+ Common Consequences
Access Control

Technical Impact: Execute unauthorized code or commands; Gain privileges / assume identity

There is the potential for arbitrary code execution with privileges of the vulnerable program if function parameter list is exhausted.


Technical Impact: DoS: crash / exit / restart

Potentially a program could fail if it needs more arguments then are available.

+ Likelihood of Exploit


+ Demonstrative Examples

Example 1

(Bad Code)
Example Languages: C and C++ 
foo_funct(one, two);...
void foo_funct(int one, int two, int three) {

printf("1) %d\n2) %d\n3) %d\n", one, two, three);
(Bad Code)
Example Languages: C and C++ 
void some_function(int foo, ...) {
int a[3], i;
va_list ap;
va_start(ap, foo);
for (i = 0; i < sizeof(a) / sizeof(int); i++) a[i] = va_arg(ap, int);
int main(int argc, char *argv[]) {

some_function(17, 42);

This can be exploited to disclose information with no work whatsoever. In fact, each time this function is run, it will print out the next 4 bytes on the stack after the two numbers sent to it.

+ Observed Examples
Server earlier allows remote attackers to cause a denial of service (crash) via an HTTP request with a sequence of "%" characters and a missing Host field.
Chat client allows remote malicious IRC servers to cause a denial of service (crash) via a PART message with (1) a missing channel or (2) a channel that the user is not in.
Proxy allows remote attackers to cause a denial of service (crash) via an HTTP request to helpout.exe with a missing HTTP version numbers.
Web server allows disclosure of CGI source code via an HTTP request without the version number.
Application server allows a remote attacker to read the source code to arbitrary 'jsp' files via a malformed URL request which does not end with an HTTP protocol specification.
Chat software allows remote attackers to cause a denial of service via malformed GIF89a headers that do not contain a GCT (Global Color Table) or an LCT (Local Color Table) after an Image Descriptor.
Server allows remote attackers to cause a denial of service (crash) via an HTTP GET request without a URI.
CGI crashes when called without any arguments.
CGI crashes when called without any arguments.
Crash in HTTP request without a Content-Length field.
Crash in HTTP request without a Content-Length field.
Empty elements/strings in protocol test suite affect many SSH2 servers/clients.
FTP server crashes in PORT command without an argument.
Resultant infoleak in web server via GET requests without HTTP/1.0 version string.
GET request with empty parameter leads to error message infoleak (path disclosure).
+ Potential Mitigations

Phase: Build and Compilation

This issue can be simply combated with the use of proper build process.

Phase: Implementation

Forward declare all functions. This is the recommended solution. Properly forward declaration of all used functions will result in a compiler error if too few arguments are sent to a function.

+ Relationships
NatureTypeIDNameView(s) this relationship pertains toView(s)
ChildOfWeakness BaseWeakness Base233Improper Handling of Parameters
Development Concepts (primary)699
Research Concepts (primary)1000
ChildOfCategoryCategory993SFP Secondary Cluster: Incorrect Input Handling
Software Fault Pattern (SFP) Clusters (primary)888
+ Taxonomy Mappings
Mapped Taxonomy NameNode IDFitMapped Node Name
PLOVERMissing Parameter Error
CLASPMissing parameter
+ Maintenance Notes

This entry will be deprecated in a future version of CWE. The term "missing parameter" was used in both PLOVER and CLASP, with completely different meanings. However, data from both taxonomies was merged into this entry. In PLOVER, it was meant to cover malformed inputs that do not contain required parameters, such as a missing parameter in a CGI request. This entry's observed examples and classification came from PLOVER. However, the description, demonstrative example, and other information are derived from CLASP. They are related to an incorrect number of function arguments, which is already covered by CWE-685.

+ Content History
Submission DateSubmitterOrganizationSource
PLOVERExternally Mined
Modification DateModifierOrganizationSource
2008-07-01Eric DalciCigitalExternal
updated Time_of_Introduction
2008-09-08CWE Content TeamMITREInternal
updated Common_Consequences, Relationships, Observed_Example, Other_Notes, Taxonomy_Mappings
2008-11-24CWE Content TeamMITREInternal
updated Observed_Examples
CWE Content TeamMITREInternal
added maintenance note: this entry will probably be deprecated
2009-03-10CWE Content TeamMITREInternal
updated Maintenance_Notes, Other_Notes, Potential_Mitigations
2011-06-01CWE Content TeamMITREInternal
updated Common_Consequences
2012-05-11CWE Content TeamMITREInternal
updated Observed_Examples, Relationships
2013-07-17CWE Content TeamMITREInternal
updated Type
2014-07-30CWE Content TeamMITREInternal
updated Relationships
Previous Entry Names
Change DatePrevious Entry Name
2008-04-11Missing Parameter Error

More information is available — Please select a different filter.
Page Last Updated: May 05, 2017