The vulnerable system is not bound to the network stack and the attacker’s path is via read/write/execute capabilities. Either: the attacker exploits the vulnerability by accessing the target system locally (e.g., keyboard, console), or through terminal emulation (e.g., SSH); or the attacker relies on User Interaction by another person to perform actions required to exploit the vulnerability (e.g., using social engineering techniques to trick a legitimate user into opening a malicious document).
Attack Complexity
Low
AC
The attacker must take no measurable action to exploit the vulnerability. The attack requires no target-specific circumvention to exploit the vulnerability. An attacker can expect repeatable success against the vulnerable system.
Privileges Required
None
PR
The attacker is unauthenticated prior to attack, and therefore does not require any access to settings or files of the vulnerable system to carry out an attack.
Scope
S
An exploited vulnerability can affect resources beyond the security scope managed by the security authority that is managing the vulnerable component. This is often referred to as a 'privilege escalation,' where the attacker can use the exploited vulnerability to gain control of resources that were not intended or authorized.
Confidentiality
High
C
There is total information disclosure, resulting in all data on the system being revealed to the attacker, or there is a possibility of the attacker gaining control over confidential data.
Integrity
High
I
There is a total compromise of system integrity. There is a complete loss of system protection, resulting in the attacker being able to modify any file on the target system.
Availability
High
A
There is a total shutdown of the affected resource. The attacker can deny access to the system or data, potentially causing significant loss to the organization.
PEAR HTML_AJAX <= 0.5.7 (PHP Serializer) PHP Object Injection Vulnerability---------------------------------------------------------------------------
PEAR HTML_AJAX <= 0.5.7 (PHP Serializer) PHP Object Injection Vulnerability
---------------------------------------------------------------------------
[-] Software Link:
https://pear.php.net/package/HTML_AJAX
[-] Affected Versions:
All versions from 0.3.0 to 0.5.7.
[-] Vulnerability Description:
The vulnerable code is located within the HTML_AJAX_Serializer_PHP class defined into
the /AJAX/Serializer/PHP.php script. Such a class uses the unserialize() PHP function
with user-controlled input unless a class name which is not in the provided array
of allowed classes is found within the serialized string. Class names are
extracted by using the _getSerializedClassNames() method:
68. function _getSerializedClassNames($string) {
69. // Strip any string representations (which might contain object syntax)
70. while (($pos = strpos($string, 's:')) !== false) {
71. $pos2 = strpos($string, ':', $pos + 2);
72. if ($pos2 === false) {
73. // invalidly serialized string
74. return false;
75. }
76. $end = $pos + 2 + substr($string, $pos + 2, $pos2) + 1;
77. $string = substr($string, 0, $pos) . substr($string, $end);
78. }
79.
80. // Pull out the class names
81. preg_match_all('/O:[0-9]+:"(.*)"/U', $string, $matches);
82.
83. // Make sure names are unique (same object serialized twice)
84. return array_unique($matches[1]);
85. }
By default the array of allowed classes is empty, meaning that no classes are allowed
to be unserialized. However, due to the faulty regular expression used at line 81, it
might be possible to bypass such a restriction by replacing "O:X" with "O:+X" from
within the serialized string, where X is the length of the class name. This can be
exploited by unauthenticated attackers to inject arbitrary PHP objects into the
application scope, allowing to perform "POP chain" attacks or exploit memory
corruption vulnerabilities within the PHP's serialization internals, potentially
leading to execution of arbitrary code on the web server.
[-] Solution:
Update to version 0.5.8 or disable the PHP Serializer.
[-] Disclosure Timeline:
[19/01/2017] - Issue reported to https://pear.php.net/bugs/bug.php?id=21165
[01/02/2017] - CVE number requested
[01/02/2017] - CVE number assigned
[02/02/2017] - Version 0.5.8 released: http://blog.pear.php.net/2017/02/02/security
[06/02/2017] - Public disclosure
[-] CVE Reference:
The Common Vulnerabilities and Exposures project (cve.mitre.org)
has assigned the name CVE-2017-5677 to this vulnerability.
[-] Credits:
Vulnerability discovered by Egidio Romano.
[-] Original Advisory:
http://karmainsecurity.com/KIS-2017-01
This information is provided for TESTING and LEGAL RESEARCH purposes only. All trademarks used are properties of their respective owners. By visiting this website you agree to Terms of Use and Privacy Policy and Impressum