CVE-2017-12932 - Use After Free

Severity

75%

Complexity

99%

Confidentiality

106%

ext/standard/var_unserializer.re in PHP 7.0.x through 7.0.22 and 7.1.x through 7.1.8 is prone to a heap use after free while unserializing untrusted data, related to improper use of the hash API for key deletion in a situation with an invalid array size. Exploitation of this issue can have an unspecified impact on the integrity of PHP.

ext/standard/var_unserializer.re in PHP 7.0.x through 7.0.22 and 7.1.x through 7.1.8 is prone to a heap use after free while unserializing untrusted data, related to improper use of the hash API for key deletion in a situation with an invalid array size. Exploitation of this issue can have an unspecified impact on the integrity of PHP.

CVSS 3.0 Base Score 9.8. CVSS Attack Vector: network. CVSS Attack Complexity: low. CVSS Vector: (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

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

Use After Free

CWE-416

The following example demonstrates the weakness.


               
}
free(buf3R2);

Use After Free

CWE-416

The following code illustrates a use after free error:


               
}
free(ptr);
logError("operation aborted before commit", ptr);

When an error occurs, the pointer is immediately freed. However, this pointer is later incorrectly used in the logError function.

Overview

Type

PHP

First reported 7 years ago

2017-08-18 03:29:00

Last updated 6 years ago

2018-05-04 01:29:00

Affected Software

PHP 7.0.0

7.0.0

PHP 7.0.1

7.0.1

PHP 7.0.2

7.0.2

PHP 7.0.3

7.0.3

PHP 7.0.4

7.0.4

PHP 7.0.5

7.0.5

PHP 7.0.6

7.0.6

PHP 7.0.7

7.0.7

PHP 7.0.8

7.0.8

PHP 7.0.9

7.0.9

PHP 7.0.10

7.0.10

PHP 7.0.11

7.0.11

PHP 7.0.12

7.0.12

PHP 7.0.13

7.0.13

PHP 7.0.14

7.0.14

PHP 7.0.15

7.0.15

PHP 7.0.16

7.0.16

PHP 7.0.17

7.0.17

PHP 7.0.18

7.0.18

PHP 7.0.19

7.0.19

PHP 7.0.20

7.0.20

PHP 7.0.21

7.0.21

PHP 7.0.22

7.0.22

PHP 7.1.0

7.1.0

PHP 7.1.1

7.1.1

PHP 7.1.2

7.1.2

PHP 7.1.3

7.1.3

PHP 7.1.4

7.1.4

PHP 7.1.5

7.1.5

PHP 7.1.6

7.1.6

PHP 7.1.7

7.1.7

PHP 7.1.8

7.1.8

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.