CVE-2009-0033 - Improper Input Validation

Severity

50%

Complexity

99%

Confidentiality

48%

Apache Tomcat 4.1.0 through 4.1.39, 5.5.0 through 5.5.27, and 6.0.0 through 6.0.18, when the Java AJP connector and mod_jk load balancing are used, allows remote attackers to cause a denial of service (application outage) via a crafted request with invalid headers, related to temporary blocking of connectors that have encountered errors, as demonstrated by an error involving a malformed HTTP Host header.

Apache Tomcat 4.1.0 through 4.1.39, 5.5.0 through 5.5.27, and 6.0.0 through 6.0.18, when the Java AJP connector and mod_jk load balancing are used, allows remote attackers to cause a denial of service (application outage) via a crafted request with invalid headers, related to temporary blocking of connectors that have encountered errors, as demonstrated by an error involving a malformed HTTP Host header.

CVSS 2.0 Base Score 5. CVSS Attack Vector: network. CVSS Attack Complexity: low. CVSS Vector: (AV:N/AC:L/Au:N/C:N/I:N/A:P).

Demo Examples

Improper Input Validation

CWE-20

This example demonstrates a shopping interaction in which the user is free to specify the quantity of items to be purchased and a total is calculated.


               
...

The user has no control over the price variable, however the code does not prevent a negative value from being specified for quantity. If an attacker were to provide a negative value, then the user would have their account credited instead of debited.

Improper Input Validation

CWE-20

This example asks the user for a height and width of an m X n game board with a maximum dimension of 100 squares.


               
.../* board dimensions */
die("No integer passed: Die evil hacker!\n");
die("No integer passed: Die evil hacker!\n");
die("Value too large: Die evil hacker!\n");

While this code checks to make sure the user cannot specify large, positive integers and consume too much memory, it does not check for negative values supplied by the user. As a result, an attacker can perform a resource consumption (CWE-400) attack against this program by specifying two, large negative values that will not overflow, resulting in a very large memory allocation (CWE-789) and possibly a system crash. Alternatively, an attacker can provide very large negative values which will cause an integer overflow (CWE-190) and unexpected behavior will follow depending on how the values are treated in the remainder of the program.

Improper Input Validation

CWE-20

The following example shows a PHP application in which the programmer attempts to display a user's birthday and homepage.


               
echo "Birthday: $birthday<br>Homepage: <a href=$homepage>click here</a>"

The programmer intended for $birthday to be in a date format and $homepage to be a valid URL. However, since the values are derived from an HTTP request, if an attacker can trick a victim into clicking a crafted URL with <script> tags providing the values for birthday and / or homepage, then the script will run on the client's browser when the web server echoes the content. Notice that even if the programmer were to defend the $birthday variable by restricting input to integers and dashes, it would still be possible for an attacker to provide a string of the form:


               
2009-01-09--

If this data were used in a SQL statement, it would treat the remainder of the statement as a comment. The comment could disable other security-related logic in the statement. In this case, encoding combined with input validation would be a more useful protection mechanism.

Furthermore, an XSS (CWE-79) attack or SQL injection (CWE-89) are just a few of the potential consequences when input validation is not used. Depending on the context of the code, CRLF Injection (CWE-93), Argument Injection (CWE-88), or Command Injection (CWE-77) may also be possible.

Improper Input Validation

CWE-20

This function attempts to extract a pair of numbers from a user-supplied string.


               
}
die("Did not specify integer value. Die evil hacker!\n");
/* proceed assuming n and m are initialized correctly */

This code attempts to extract two integer values out of a formatted, user-supplied input. However, if an attacker were to provide an input of the form:


               
123:

then only the m variable will be initialized. Subsequent use of n may result in the use of an uninitialized variable (CWE-457).

Improper Input Validation

CWE-20

The following example takes a user-supplied value to allocate an array of objects and then operates on the array.


               
}
list[0] = new Widget();
die("Negative value supplied for list size, die evil hacker!");

This example attempts to build a list from a user-specified value, and even checks to ensure a non-negative value is supplied. If, however, a 0 value is provided, the code will build an array of size 0 and then try to store a new Widget in the first location, causing an exception to be thrown.

Improper Input Validation

CWE-20

This application has registered to handle a URL when sent an intent:


               
}......
}
}
int length = URL.length();
...

The application assumes the URL will always be included in the intent. When the URL is not present, the call to getStringExtra() will return null, thus causing a null pointer exception when length() is called.

Overview

Type

Apache Software Foundation Tomcat

First reported 15 years ago

2009-06-05 16:00:00

Last updated 5 years ago

2019-03-25 11:30:00

Affected Software

Apache Software Foundation Tomcat 4.1.0

4.1.0

Apache Software Foundation Tomcat 4.1.1

4.1.1

Apache Software Foundation Tomcat 4.1.2

4.1.2

Apache Software Foundation Tomcat 4.1.3

4.1.3

Apache Software Foundation Tomcat 4.1.3 beta

4.1.3

Apache Software Foundation Tomcat 4.1.4

4.1.4

Apache Software Foundation Tomcat 4.1.5

4.1.5

Apache Software Foundation Tomcat 4.1.6

4.1.6

Apache Software Foundation Tomcat 4.1.8

4.1.8

Apache Software Foundation Tomcat 4.1.9 beta

4.1.9

Apache Software Foundation Tomcat 4.1.10

4.1.10

Apache Software Foundation Tomcat 4.1.12

4.1.12

Apache Software Foundation Tomcat 4.1.15

4.1.15

Apache Software Foundation Tomcat 4.1.17

4.1.17

Apache Software Foundation Tomcat 4.1.19

4.1.19

Apache Software Foundation Tomcat 4.1.20

4.1.20

Apache Software Foundation Tomcat 4.1.23

4.1.23

Apache Software Foundation Tomcat 4.1.24

4.1.24

Apache Software Foundation Tomcat 4.1.28

4.1.28

Apache Software Foundation Tomcat 4.1.29

4.1.29

Apache Software Foundation Tomcat 4.1.30

4.1.30

Apache Software Foundation Tomcat 4.1.31

4.1.31

Apache Software Foundation Tomcat 4.1.32

4.1.32

Apache Software Foundation Tomcat 4.1.33

4.1.33

Apache Software Foundation Tomcat 4.1.35

4.1.35

Apache Software Foundation Tomcat 4.1.36

4.1.36

Apache Software Foundation Tomcat 4.1.37

4.1.37

Apache Software Foundation Tomcat 4.1.38

4.1.38

Apache Software Foundation Tomcat 4.1.39

4.1.39

Apache Software Foundation Tomcat 5.5.0

5.5.0

Apache Software Foundation Tomcat 5.5.1

5.5.1

Apache Software Foundation Tomcat 5.5.2

5.5.2

Apache Software Foundation Tomcat 5.5.3

5.5.3

Apache Software Foundation Tomcat 5.5.4

5.5.4

Apache Software Foundation Tomcat 5.5.5

5.5.5

Apache Software Foundation Tomcat 5.5.6

5.5.6

Apache Software Foundation Tomcat 5.5.7

5.5.7

Apache Software Foundation Tomcat 5.5.8

5.5.8

Apache Software Foundation Tomcat 5.5.9

5.5.9

Apache Software Foundation Tomcat 5.5.10

5.5.10

Apache Software Foundation Tomcat 5.5.11

5.5.11

Apache Software Foundation Tomcat 5.5.12

5.5.12

Apache Software Foundation Tomcat 5.5.13

5.5.13

Apache Software Foundation Tomcat 5.5.14

5.5.14

Apache Software Foundation Tomcat 5.5.15

5.5.15

Apache Software Foundation Tomcat 5.5.16

5.5.16

Apache Software Foundation Tomcat 5.5.17

5.5.17

Apache Software Foundation Tomcat 5.5.18

5.5.18

Apache Software Foundation Tomcat 5.5.19

5.5.19

Apache Software Foundation Tomcat 5.5.20

5.5.20

Apache Software Foundation Tomcat 5.5.21

5.5.21

Apache Software Foundation Tomcat 5.5.22

5.5.22

Apache Software Foundation Tomcat 5.5.23

5.5.23

Apache Software Foundation Tomcat 5.5.24

5.5.24

Apache Software Foundation Tomcat 5.5.25

5.5.25

Apache Software Foundation Tomcat 5.5.26

5.5.26

Apache Software Foundation Tomcat 5.5.27

5.5.27

Apache Software Foundation Tomcat 6.0.0

6.0.0

Apache Software Foundation Tomcat 6.0.1

6.0.1

Apache Software Foundation Tomcat 6.0.2

6.0.2

Apache Software Foundation Tomcat 6.0.3

6.0.3

Apache Software Foundation Tomcat 6.0.4

6.0.4

Apache Software Foundation Tomcat 6.0.5

6.0.5

Apache Software Foundation Tomcat 6.0.6

6.0.6

Apache Software Foundation Tomcat 6.0.7

6.0.7

Apache Software Foundation Tomcat 6.0.8

6.0.8

Apache Software Foundation Tomcat 6.0.9

6.0.9

Apache Software Foundation Tomcat 6.0.10

6.0.10

Apache Software Foundation Tomcat 6.0.11

6.0.11

Apache Software Foundation Tomcat 6.0.12

6.0.12

Apache Software Foundation Tomcat 6.0.13

6.0.13

Apache Software Foundation Tomcat 6.0.14

6.0.14

Apache Software Foundation Tomcat 6.0.15

6.0.15

Apache Software Foundation Tomcat 6.0.16

6.0.16

References

JVN#87272440

APPLE-SA-2010-03-29-1

SUSE-SR:2009:012

HPSBMA02535

HPSBUX02579

HPSBOV02762

HPSBUX02860

35326

Vendor Advisory

35344

Vendor Advisory

35685

35788

37460

42368

1022331

263529

http://support.apple.com/kb/HT4077

http://svn.apache.org/viewvc?rev=742915&view=rev

Patch, Vendor Advisory

http://svn.apache.org/viewvc?rev=781362&view=rev

Patch, Vendor Advisory

http://tomcat.apache.org/security-4.html

Patch, Vendor Advisory

http://tomcat.apache.org/security-5.html

Patch, Vendor Advisory

http://tomcat.apache.org/security-6.html

Patch, Vendor Advisory

DSA-2207

MDVSA-2009:136

MDVSA-2009:138

MDVSA-2010:176

20090603 [SECURITY] CVE-2009-0033 Apache Tomcat DoS when using Java AJP connector

20091120 VMSA-2009-0016 VMware vCenter and ESX update release and vMA patch release address multiple security issue in third party components

35193

Patch

http://www.vmware.com/security/advisories/VMSA-2009-0016.html

ADV-2009-1496

Patch, Vendor Advisory

ADV-2009-1856

ADV-2009-3316

ADV-2010-3056

tomcat-ajp-dos(50928)

[tomcat-dev] 20190319 svn commit: r1855831 [22/30] - in /tomcat/site/trunk: ./ docs/ xdocs/

[tomcat-dev] 20190319 svn commit: r1855831 [21/30] - in /tomcat/site/trunk: ./ docs/ xdocs/

[tomcat-dev] 20190325 svn commit: r1856174 [20/29] - in /tomcat/site/trunk: docs/ xdocs/ xdocs/stylesheets/

[tomcat-dev] 20190325 svn commit: r1856174 [19/29] - in /tomcat/site/trunk: docs/ xdocs/ xdocs/stylesheets/

[tomcat-dev] 20200213 svn commit: r1873980 [25/34] - /tomcat/site/trunk/docs/

[tomcat-dev] 20200203 svn commit: r1873527 [22/30] - /tomcat/site/trunk/docs/

[tomcat-dev] 20200213 svn commit: r1873980 [24/34] - /tomcat/site/trunk/docs/

oval:org.mitre.oval:def:10231

oval:org.mitre.oval:def:19110

oval:org.mitre.oval:def:5739

FEDORA-2009-11374

FEDORA-2009-11352

FEDORA-2009-11356

Stay updated

ExploitPedia is constantly evolving. Sign up to receive a notification when we release additional functionality.

Get in touch

If you'd like to report a bug or have any suggestions for improvements then please do get in touch with us using this form. We will get back to you as soon as we can.