CVE-2013-0912 - Improper Control of Generation of Code ('Code Injection')

Severity

75%

Complexity

99%

Confidentiality

106%

WebKit in Google Chrome before 25.0.1364.160 allows remote attackers to execute arbitrary code via vectors that leverage "type confusion."

WebKit in Google Chrome before 25.0.1364.160 allows remote attackers to execute arbitrary code via vectors that leverage "type confusion."

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

Demo Examples

Improper Control of Generation of Code ('Code Injection')

CWE-94

This example attempts to write user messages to a message file and allow users to view them.


               
}
echo "Message Saved!<p>\n";
include($MessageFile);

While the programmer intends for the MessageFile to only include data, an attacker can provide a message such as:


               
message=%3C?php%20system(%22/bin/ls%20-l%22);?%3E

which will decode to the following:


               
<?php system("/bin/ls -l");?>

The programmer thought they were just including the contents of a regular data file, but PHP parsed it and executed the code. Now, this code is executed any time people view messages.

Notice that XSS (CWE-79) is also possible in this situation.

Improper Control of Generation of Code ('Code Injection')

CWE-94

edit-config.pl: This CGI script is used to modify settings in a configuration file.


               
}
# code to add a field/key to a file goes here
# code to set key to a particular file goes here
# code to delete key from a particular file goes here
eval($code);# this is super-efficient code, especially if you have to invoke# any one of dozens of different functions!
handleConfigAction($configfile, param('action'));
print "No action specified!\n";

The script intends to take the 'action' parameter and invoke one of a variety of functions based on the value of that parameter - config_file_add_key(), config_file_set_key(), or config_file_delete_key(). It could set up a conditional to invoke each function separately, but eval() is a powerful way of doing the same thing in fewer lines of code, especially when a large number of functions or variables are involved. Unfortunately, in this case, the attacker can provide other values in the action parameter, such as: add_key(",","); system("/bin/ls"); This would produce the following string in handleConfigAction(): config_file_add_key(",","); system("/bin/ls"); Any arbitrary Perl code could be added after the attacker has "closed off" the construction of the original function call, in order to prevent parsing errors from causing the malicious eval() to fail before the attacker's payload is activated. This particular manipulation would fail after the system() call, because the "_key(\$fname, \$key, \$val)" portion of the string would cause an error, but this is irrelevant to the attack because the payload has already been activated.

Overview

Type

Google Chrome

First reported 11 years ago

2013-03-11 10:55:00

Last updated 7 years ago

2017-09-19 01:35:00

Affected Software

Google Chrome 25.0.1364.0

25.0.1364.0

Google Chrome 25.0.1364.1

25.0.1364.1

Google Chrome 25.0.1364.2

25.0.1364.2

Google Chrome 25.0.1364.3

25.0.1364.3

Google Chrome 25.0.1364.5

25.0.1364.5

Google Chrome 25.0.1364.7

25.0.1364.7

Google Chrome 25.0.1364.8

25.0.1364.8

Google Chrome 25.0.1364.9

25.0.1364.9

Google Chrome 25.0.1364.10

25.0.1364.10

Google Chrome 25.0.1364.11

25.0.1364.11

Google Chrome 25.0.1364.12

25.0.1364.12

Google Chrome 25.0.1364.13

25.0.1364.13

Google Chrome 25.0.1364.14

25.0.1364.14

Google Chrome 25.0.1364.15

25.0.1364.15

Google Chrome 25.0.1364.16

25.0.1364.16

Google Chrome 25.0.1364.17

25.0.1364.17

Google Chrome 25.0.1364.18

25.0.1364.18

Google Chrome 25.0.1364.19

25.0.1364.19

Google Chrome 25.0.1364.20

25.0.1364.20

Google Chrome 25.0.1364.21

25.0.1364.21

Google Chrome 25.0.1364.22

25.0.1364.22

Google Chrome 25.0.1364.23

25.0.1364.23

Google Chrome 25.0.1364.24

25.0.1364.24

Google Chrome 25.0.1364.25

25.0.1364.25

Google Chrome 25.0.1364.26

25.0.1364.26

Google Chrome 25.0.1364.27

25.0.1364.27

Google Chrome 25.0.1364.28

25.0.1364.28

Google Chrome 25.0.1364.29

25.0.1364.29

Google Chrome 25.0.1364.30

25.0.1364.30

Google Chrome 25.0.1364.31

25.0.1364.31

Google Chrome 25.0.1364.32

25.0.1364.32

Google Chrome 25.0.1364.33

25.0.1364.33

Google Chrome 25.0.1364.34

25.0.1364.34

Google Chrome 25.0.1364.35

25.0.1364.35

Google Chrome 25.0.1364.36

25.0.1364.36

Google Chrome 25.0.1364.37

25.0.1364.37

Google Chrome 25.0.1364.38

25.0.1364.38

Google Chrome 25.0.1364.39

25.0.1364.39

Google Chrome 25.0.1364.40

25.0.1364.40

Google Chrome 25.0.1364.41

25.0.1364.41

Google Chrome 25.0.1364.42

25.0.1364.42

Google Chrome 25.0.1364.43

25.0.1364.43

Google Chrome 25.0.1364.44

25.0.1364.44

Google Chrome 25.0.1364.45

25.0.1364.45

Google Chrome 25.0.1364.46

25.0.1364.46

Google Chrome 25.0.1364.47

25.0.1364.47

Google Chrome 25.0.1364.48

25.0.1364.48

Google Chrome 25.0.1364.49

25.0.1364.49

Google Chrome 25.0.1364.50

25.0.1364.50

Google Chrome 25.0.1364.51

25.0.1364.51

Google Chrome 25.0.1364.52

25.0.1364.52

Google Chrome 25.0.1364.53

25.0.1364.53

Google Chrome 25.0.1364.54

25.0.1364.54

Google Chrome 25.0.1364.55

25.0.1364.55

Google Chrome 25.0.1364.56

25.0.1364.56

Google Chrome 25.0.1364.57

25.0.1364.57

Google Chrome 25.0.1364.58

25.0.1364.58

Google Chrome 25.0.1364.61

25.0.1364.61

Google Chrome 25.0.1364.62

25.0.1364.62

Google Chrome 25.0.1364.63

25.0.1364.63

Google Chrome 25.0.1364.65

25.0.1364.65

Google Chrome 25.0.1364.66

25.0.1364.66

Google Chrome 25.0.1364.67

25.0.1364.67

Google Chrome 25.0.1364.68

25.0.1364.68

Google Chrome 25.0.1364.70

25.0.1364.70

Google Chrome 25.0.1364.72

25.0.1364.72

Google Chrome 25.0.1364.73

25.0.1364.73

Google Chrome 25.0.1364.74

25.0.1364.74

Google Chrome 25.0.1364.75

25.0.1364.75

Google Chrome 25.0.1364.76

25.0.1364.76

Google Chrome 25.0.1364.77

25.0.1364.77

Google Chrome 25.0.1364.78

25.0.1364.78

Google Chrome 25.0.1364.79

25.0.1364.79

Google Chrome 25.0.1364.80

25.0.1364.80

Google Chrome 25.0.1364.81

25.0.1364.81

Google Chrome 25.0.1364.82

25.0.1364.82

Google Chrome 25.0.1364.84

25.0.1364.84

Google Chrome 25.0.1364.85

25.0.1364.85

Google Chrome 25.0.1364.86

25.0.1364.86

Google Chrome 25.0.1364.87

25.0.1364.87

Google Chrome 25.0.1364.88

25.0.1364.88

Google Chrome 25.0.1364.89

25.0.1364.89

Google Chrome 25.0.1364.90

25.0.1364.90

Google Chrome 25.0.1364.91

25.0.1364.91

Google Chrome 25.0.1364.92

25.0.1364.92

Google Chrome 25.0.1364.93

25.0.1364.93

Google Chrome 25.0.1364.95

25.0.1364.95

Google Chrome 25.0.1364.98

25.0.1364.98

Google Chrome 25.0.1364.99

25.0.1364.99

Google Chrome 25.0.1364.108

25.0.1364.108

Google Chrome 25.0.1364.110

25.0.1364.110

Google Chrome 25.0.1364.112

25.0.1364.112

Google Chrome 25.0.1364.113

25.0.1364.113

Google Chrome 25.0.1364.114

25.0.1364.114

Google Chrome 25.0.1364.115

25.0.1364.115

Google Chrome 25.0.1364.116

25.0.1364.116

Google Chrome 25.0.1364.117

25.0.1364.117

Google Chrome 25.0.1364.118

25.0.1364.118

Google Chrome 25.0.1364.119

25.0.1364.119

Google Chrome 25.0.1364.120

25.0.1364.120

Google Chrome 25.0.1364.121

25.0.1364.121

Google Chrome 25.0.1364.122

25.0.1364.122

Google Chrome 25.0.1364.123

25.0.1364.123

Google Chrome 25.0.1364.124

25.0.1364.124

Google Chrome 25.0.1364.125

25.0.1364.125

Google Chrome 25.0.1364.126

25.0.1364.126

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.