{"id":16655,"date":"2021-07-08T13:31:04","date_gmt":"2021-07-08T11:31:04","guid":{"rendered":"https:\/\/herolab-usd.formwandler.rocks\/security-advisories\/usd-2019-0072\/"},"modified":"2021-07-19T14:14:04","modified_gmt":"2021-07-19T12:14:04","slug":"usd-2019-0072","status":"publish","type":"page","link":"https:\/\/herolab.usd.de\/en\/security-advisories\/usd-2019-0072\/","title":{"rendered":"usd-2019-0072"},"content":{"rendered":"<p>[et_pb_section fb_built=\"1\" _builder_version=\"4.9.4\" _module_preset=\"default\" background_color=\"#2E353D\" custom_padding=\"||0px|||\"][et_pb_row _builder_version=\"4.9.4\" _module_preset=\"default\"][et_pb_column type=\"4_4\" _builder_version=\"4.9.4\" _module_preset=\"default\"][et_pb_text _builder_version=\"4.9.4\" _module_preset=\"cc5ac6f4-ebbd-4b3f-bc92-4dfc1f15fe2c\" hover_enabled=\"0\" sticky_enabled=\"0\"]<\/p>\n<h1 class=\"h-custom-headline usd-small-letters h2\"><span>usd-2019-0072 | IT-Recht Kanzlei Plugin for Zen Cart<\/span><\/h1>\n<p><span><\/span><\/p>\n<p><span><\/span><strong>Advisory ID<\/strong><span>: usd-2019-0072<\/span><br \/><strong>CVE Number<\/strong><span>: CVE-2020-6577<\/span><br \/><strong>Affected Product<\/strong><span>: IT-Recht Kanzlei Plugin for Zen Cart deutsch<\/span><br \/><strong>Affected Version<\/strong><span>: v1.5.6c (Zen Cart deutsch version)<\/span><br \/><strong>Vulnerability Type<\/strong><span>: SQL Injection<\/span><br \/><strong>Security Risk<\/strong><span>: Medium<\/span><br \/><strong>Vendor<\/strong><span>: IT-Recht Kanzlei<\/span><br \/><strong>Vendor URL<\/strong><span>: https:\/\/www.it-recht-kanzlei.de<\/span><br \/><strong>Vendor Status<\/strong><span>: fixed<\/span><\/p>\n<h3><\/h3>\n<h3>Description<\/h3>\n<p><span>The \u201eIT-Rechtkanzlei\u201c module, which is included by default in German Zen Cart releases, is vulnerable to blind SQL injections. The \u201eIT-Rechtkanzlei\u201c offers the possibility to distribute legal texts as PDF to various webshops via its interface. The file <\/span><code>itrk-api.php<\/code><span> in the root directory of webshops such as Zen Cart can get an XML in the POST parameter with the legal texts. The <\/span><code>rechtstext_language<\/code><span> tag is dynamically embedded into an SQL query and can be used to exploit SQL injections. But in order to exploit this vulnerability, the attacker needs a valid \u201eIT-Rechtkanzlei\u201c token which is randomly generated while creating the webshop. Since the \u201eIT-Rechtkanzlei\u201c has access to those tokens, the company would be able to dump or modify the database of a Zen Cart application.<\/span><\/p>\n<p><span><\/span><\/p>\n<h3>Proof of Concept (PoC)<\/h3>\n<p><span>The following request results in a blind SQL injection where the <\/span><code>rechtstext_language<\/code><span> tag is the vulnerable parameter:<\/span><\/p>\n<p>[\/et_pb_text][et_pb_image src=\"https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2021\/07\/evidence-1-3.png\" _builder_version=\"4.9.4\" _module_preset=\"default\" title_text=\"evidence-1-3\" hover_enabled=\"0\" sticky_enabled=\"0\"][\/et_pb_image][et_pb_text _builder_version=\"4.9.4\" _module_preset=\"cc5ac6f4-ebbd-4b3f-bc92-4dfc1f15fe2c\" hover_enabled=\"0\" sticky_enabled=\"0\"]<\/p>\n<p><span>The <\/span><code>it_recht_kanzlei_api.php<\/code><span> file contains the vulnerability in line 105:<\/span><\/p>\n<p>[\/et_pb_text][et_pb_image src=\"https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2021\/07\/evidence-2-6.png\" _builder_version=\"4.9.4\" _module_preset=\"default\" title_text=\"evidence-2-6\" hover_enabled=\"0\" sticky_enabled=\"0\"][\/et_pb_image][et_pb_text _builder_version=\"4.9.4\" _module_preset=\"cc5ac6f4-ebbd-4b3f-bc92-4dfc1f15fe2c\" custom_margin=\"||27px||false|false\" hover_enabled=\"0\" sticky_enabled=\"0\"]<\/p>\n<p>The query is not prepared and the <code>$language_code<\/code> variable is also not escaped. Therefore this results in a blind SQL injection flaw. A similar vulnerability occurs in line 222.<\/p>\n<p>The following POST request would add a sleep of 5 seconds to the database query. Using this method, a blind SQL injection can be verified.<\/p>\n<p>[\/et_pb_text][et_pb_image src=\"https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2021\/07\/evidence-3-2.png\" title_text=\"evidence-3-2\" _builder_version=\"4.9.4\" _module_preset=\"default\" custom_margin=\"27px||43px||false|false\" hover_enabled=\"0\" sticky_enabled=\"0\"][\/et_pb_image][et_pb_text _builder_version=\"4.9.4\" _module_preset=\"cc5ac6f4-ebbd-4b3f-bc92-4dfc1f15fe2c\" hover_enabled=\"0\" sticky_enabled=\"0\"]<\/p>\n<div class=\"e16902-22 x-container max width\">\n<div class=\"e16902-23 x-column x-sm x-1-1\">\n<h3>Fix<\/h3>\n<p><span>All statements and parameters should be prepared before executing the queries. Make sure to encode the user supplied input.<\/span><\/p>\n<h3><\/h3>\n<h3>Timeline<\/h3>\n<ul>\n<li>2019-12-16 Vulnerability discovered by Gerbert Roitburd and Markus Schader<\/li>\n<li>2020-02-14 Initial contact with vendor<\/li>\n<li>2020-03-06 Vulnerability details transmitted to vendor<\/li>\n<li>2020-03-07 Fix proposed by vendor<\/li>\n<li>2020-03-12 Effectiveness of fix verified by usd AG<\/li>\n<li>2020-03-12 Vendor informs about upcoming release containing fix<\/li>\n<li>2021-02-22 Retesting of released fix<\/li>\n<li>2021-02-26 Security advisory released<\/li>\n<\/ul>\n<h3>Credits<\/h3>\n<p><span>This security vulnerability was discovered by Gerbert Roitburd and Markus Schader of usd AG.<\/span><\/p>\n<\/div>\n<\/div>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>usd-2019-0072 | IT-Recht Kanzlei Plugin for Zen Cart Advisory ID: usd-2019-0072CVE Number: CVE-2020-6577Affected Product: IT-Recht Kanzlei Plugin for Zen Cart deutschAffected Version: v1.5.6c (Zen Cart deutsch version)Vulnerability Type: SQL InjectionSecurity Risk: MediumVendor: IT-Recht KanzleiVendor URL: https:\/\/www.it-recht-kanzlei.deVendor Status: fixed Description The \u201eIT-Rechtkanzlei\u201c module, which is included by default in German Zen Cart releases, is vulnerable to [&hellip;]<\/p>\n","protected":false},"author":96,"featured_media":0,"parent":16124,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_et_pb_use_builder":"on","_et_pb_old_content":"","_et_gb_content_width":"","inline_featured_image":false,"footnotes":""},"class_list":["post-16655","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/16655","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/users\/96"}],"replies":[{"embeddable":true,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/comments?post=16655"}],"version-history":[{"count":0,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/16655\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/16124"}],"wp:attachment":[{"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/media?parent=16655"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}