CVE-2011-0633 - Improper Input Validation

Severity

43%

Complexity

86%

Confidentiality

48%

The Net::HTTPS module in libwww-perl (LWP) before 6.00, as used in WWW::Mechanize, LWP::UserAgent, and other products, when running in environments that do not set the If-SSL-Cert-Subject header, does not enable full validation of SSL certificates by default, which allows remote attackers to spoof servers via man-in-the-middle (MITM) attacks involving hostnames that are not properly validated. NOTE: it could be argued that this is a design limitation of the Net::HTTPS API, and separate implementations should be independently assigned CVE identifiers for not working around this limitation. However, because this API was modified within LWP, a single CVE identifier has been assigned.

The Net::HTTPS module in libwww-perl (LWP) before 6.00, as used in WWW::Mechanize, LWP::UserAgent, and other products, when running in environments that do not set the If-SSL-Cert-Subject header, does not enable full validation of SSL certificates by default, which allows remote attackers to spoof servers via man-in-the-middle (MITM) attacks involving hostnames that are not properly validated. NOTE: it could be argued that this is a design limitation of the Net::HTTPS API, and separate implementations should be independently assigned CVE identifiers for not working around this limitation. However, because this API was modified within LWP, a single CVE identifier has been assigned.

CVSS 2.0 Base Score 4.3. CVSS Attack Vector: network. CVSS Attack Complexity: medium. CVSS Vector: (AV:N/AC:M/Au:N/C:N/I:P/A:N).

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

First reported 13 years ago

2011-05-13 22:55:00

Last updated 6 years ago

2018-10-30 16:26:00

Affected Software

Gisle Aas libwww-perl 0.01

0.01

Gisle Aas libwww-perl 0.02

0.02

Gisle Aas libwww-perl 0.03

0.03

Gisle Aas libwww-perl 0.04

0.04

Gisle Aas libwww-perl 5.00

5.00

Gisle Aas libwww-perl 5.01

5.01

Gisle Aas libwww-perl 5.02

5.02

Gisle Aas libwww-perl 5.03

5.03

Gisle Aas libwww-perl 5.04

5.04

Gisle Aas libwww-perl 5.05

5.05

Gisle Aas libwww-perl 5.06

5.06

Gisle Aas libwww-perl 5.07

5.07

Gisle Aas libwww-perl 5.08

5.08

Gisle Aas libwww-perl 5.09

5.09

Gisle Aas libwww-perl 5.10

5.10

Gisle Aas libwww-perl 5.11

5.11

Gisle Aas libwww-perl 5.12

5.12

Gisle Aas libwww-perl 5.13

5.13

Gisle Aas libwww-perl 5.14

5.14

Gisle Aas libwww-perl 5.15

5.15

Gisle Aas libwww-perl 5.16

5.16

Gisle Aas libwww-perl 5.17

5.17

Gisle Aas libwww-perl 5.18

5.18

Gisle Aas libwww-perl 5.18_03

5.18_03

Gisle Aas libwww-perl 5.18_04

5.18_04

Gisle Aas libwww-perl 5.18_05

5.18_05

Gisle Aas libwww-perl 5.19

5.19

Gisle Aas libwww-perl 5.20

5.20

Gisle Aas libwww-perl 5.21

5.21

Gisle Aas libwww-perl 5.22

5.22

Gisle Aas libwww-perl 5.30

5.30

Gisle Aas libwww-perl 5.31

5.31

Gisle Aas libwww-perl 5.32

5.32

Gisle Aas libwww-perl 5.33

5.33

Gisle Aas libwww-perl 5.34

5.34

Gisle Aas libwww-perl 5.35

5.35

Gisle Aas libwww-perl 5.36

5.36

Gisle Aas libwww-perl 5.41

5.41

Gisle Aas libwww-perl 5.42

5.42

Gisle Aas libwww-perl 5.43

5.43

Gisle Aas libwww-perl 5.44

5.44

Gisle Aas libwww-perl 5.45

5.45

Gisle Aas libwww-perl 5.46

5.46

Gisle Aas libwww-perl 5.47

5.47

Gisle Aas libwww-perl 5.48

5.48

Gisle Aas libwww-perl 5.49

5.49

Gisle Aas libwww-perl 5.50

5.50

Gisle Aas libwww-perl 5.51

5.51

Gisle Aas libwww-perl 5.52

5.52

Gisle Aas libwww-perl 5.53

5.53

Gisle Aas libwww-perl 5.53_90

5.53_90

Gisle Aas libwww-perl 5.53_91

5.53_91

Gisle Aas libwww-perl 5.53_92

5.53_92

Gisle Aas libwww-perl 5.53_93

5.53_93

Gisle Aas libwww-perl 5.53_94

5.53_94

Gisle Aas libwww-perl 5.53_95

5.53_95

Gisle Aas libwww-perl 5.53_96

5.53_96

Gisle Aas libwww-perl 5.53_97

5.53_97

Gisle Aas libwww-perl 5.60

5.60

Gisle Aas libwww-perl 5.61

5.61

Gisle Aas libwww-perl 5.62

5.62

Gisle Aas libwww-perl 5.63

5.63

Gisle Aas libwww-perl 5.64

5.64

Gisle Aas libwww-perl 5.65

5.65

Gisle Aas libwww-perl 5.66

5.66

Gisle Aas libwww-perl 5.67

5.67

Gisle Aas libwww-perl 5.68

5.68

Gisle Aas libwww-perl 5.69

5.69

Gisle Aas libwww-perl 5.70

5.70

Gisle Aas libwww-perl 5.71

5.71

Gisle Aas libwww-perl 5.72

5.72

Gisle Aas libwww-perl 5.73

5.73

Gisle Aas libwww-perl 5.74

5.74

Gisle Aas libwww-perl 5.75

5.75

Gisle Aas libwww-perl 5.76

5.76

Gisle Aas libwww-perl 5.77

5.77

Gisle Aas libwww-perl 5.78

5.78

Gisle Aas libwww-perl 5.79

5.79

Gisle Aas libwww-perl 5.800

5.800

Gisle Aas libwww-perl 5.801

5.801

Gisle Aas libwww-perl 5.802

5.802

Gisle Aas libwww-perl 5.803

5.803

Gisle Aas libwww-perl 5.804

5.804

Gisle Aas libwww-perl 5.805

5.805

Gisle Aas libwww-perl 5.806

5.806

Gisle Aas libwww-perl 5.807

5.807

Gisle Aas libwww-perl 5.808

5.808

Gisle Aas libwww-perl 5.810

5.810

Gisle Aas libwww-perl 5.811

5.811

Gisle Aas libwww-perl 5.812

5.812

Gisle Aas libwww-perl 5.813

5.813

Gisle Aas libwww-perl 5.814

5.814

Gisle Aas libwww-perl 5.815

5.815

Gisle Aas libwww-perl 5.816

5.816

Gisle Aas libwww-perl 5.817

5.817

Gisle Aas libwww-perl 5.818

5.818

Gisle Aas libwww-perl 5.819

5.819

Gisle Aas libwww-perl 5.820

5.820

Gisle Aas libwww-perl 5.821

5.821

Gisle Aas libwww-perl 5.822

5.822

Gisle Aas libwww-perl 5.823

5.823

Gisle Aas libwww-perl 5.824

5.824

Gisle Aas libwww-perl 5.825

5.825

Gisle Aas libwww-perl 5.826

5.826

Gisle Aas libwww-perl 5.827

5.827

Gisle Aas libwww-perl 5.828

5.828

Gisle Aas libwww-perl 5.829

5.829

Gisle Aas libwww-perl 5.830

5.830

Gisle Aas libwww-perl 5.831

5.831

Gisle Aas libwww-perl 5.832

5.832

Gisle Aas libwww-perl 5.833

5.833

Gisle Aas libwww-perl 5.834

5.834

Gisle Aas libwww-perl 5.836

5.836

Gisle Aas libwww-perl 5b5

5b5

Gisle Aas libwww-perl 5b6

5b6

Gisle Aas libwww-perl 5b7

5b7

Gisle Aas libwww-perl 5b8

5b8

Gisle Aas libwww-perl 5b9

5b9

Gisle Aas libwww-perl 5b10

5b10

Gisle Aas libwww-perl 5b11

5b11

Gisle Aas libwww-perl 5b12

5b12

Gisle Aas libwww-perl 5b13

5b13

search.cpan.org libwww-perl 5.40_01

5.40_01

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.