{"id":22420,"date":"2024-03-26T12:45:20","date_gmt":"2024-03-26T11:45:20","guid":{"rendered":"https:\/\/herolab.usd.de\/security-advisories\/usd-2023-0038\/"},"modified":"2024-04-03T11:31:19","modified_gmt":"2024-04-03T09:31:19","slug":"usd-2023-0038","status":"publish","type":"page","link":"https:\/\/herolab.usd.de\/en\/security-advisories\/usd-2023-0038\/","title":{"rendered":"usd-2023-0038"},"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.24.2\" _module_preset=\"default\" custom_padding=\"||13px|||\" global_colors_info=\"{}\"]<\/p>\n<h1>usd-2023-0038 | Broken Access Control in SAP Fiori Sample Shop<\/h1>\n<p><strong>Advisory ID<\/strong>: usd-2023-0038<br \/><strong>Product<\/strong>: SAP Fiori Sample Shop<br \/><strong>Affected Version<\/strong>: Docker Image sapse\/abap-platform-trial:1909<br \/><strong>Vulnerability Type<\/strong>: CWE-284 (Improper Access Control)<br \/><strong>Security Risk<\/strong>: MEDIUM - CVSS:3.1\/AV:N\/AC:L\/PR:N\/UI:N\/S:U\/C:N\/I:L\/A:L<br \/><strong>Vendor URL<\/strong>: <a href=\"https:\/\/www.sap.com\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.sap.com\/<\/a><br \/><strong>Vendor Status<\/strong>: Fixed<br \/><strong>CVE number<\/strong>: Not assigned<br \/><strong>Last Update<\/strong>: 2024-03-18<\/p>\n<h3>Affected Component<\/h3>\n<p>SAP Trial docker container with pre-configured SAP Fiori Sample Shop<\/p>\n<h3>Description<\/h3>\n<p>SAP Fiori is the SAP webfrontend which can host various applications from an application store or custom applications, which can be built with SAP ABAP.<br \/>When using the application, backend requests are sent to an OData API.<br \/>If API permissions differ from the configuration applied to the frontend component, attackers may execute backend functionality without authorization granted in the frontend.<\/p>\n<h3>Proof of Concept<\/h3>\n<p>The preconfigured shop contains several pieces of sample data. For our PoC we pick a random product from the shop. In the product overview in the upper right corner, we can write a review, as can be seen in the following screenshot:<br \/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2024\/03\/write_review.png\" width=\"1302\" height=\"762\" alt=\"\" class=\"wp-image-22404 alignnone size-full\" srcset=\"https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2024\/03\/write_review.png 1302w, https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2024\/03\/write_review-1280x749.png 1280w, https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2024\/03\/write_review-980x574.png 980w, https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2024\/03\/write_review-480x281.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) and (max-width: 1280px) 1280px, (min-width: 1281px) 1302px, 100vw\" \/><br \/>At the bottom all reviews are displayed. As can be seen in the following screenshot, only our own reviews have an associated delete button:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2024\/03\/own_review.png\" width=\"1211\" height=\"348\" alt=\"\" class=\"wp-image-22402 alignnone size-full\" srcset=\"https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2024\/03\/own_review.png 1211w, https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2024\/03\/own_review-980x282.png 980w, https:\/\/herolab.usd.de\/wp-content\/uploads\/sites\/9\/2024\/03\/own_review-480x138.png 480w\" sizes=\"(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1211px, 100vw\" \/><\/p>\n<p>The following request will be sent to the OData backend API by clicking the frontend's delete button on our own review:<\/p>\n<pre class=\"codehilite\" style=\"line-height: 125%;background: #263238;color: #eff\">DELETE \/sap\/opu\/odata\/sap\/SEPMRA_SHOP\/Reviews(guid'0242ac11-0002-1eee-9792-6efba254d650')?sap-client=001 HTTP\/1.1sap-contextid-accept: headerAccept: application\/jsonAccept-Language: enDataServiceVersion: 2.0MaxDataServiceVersion: 2.0x-csrf-token: nK8sL23VXwnBlSOaso7TXg==<\/pre>\n<p>Intercepting this requst allows us to resend it with other guids placed in the request. Thereby we can delete other user's reviews.<\/p>\n<p>The necessary guids can be enumerated by sending the following request:<\/p>\n<pre class=\"codehilite\" style=\"line-height: 125%;background: #263238;color: #eff\">GET \/sap\/opu\/odata\/sap\/SEPMRA_SHOP\/Reviews?sap-client=001 HTTP\/1.1sap-contextid-accept: headerAccept: application\/jsonAccept-Language: enDataServiceVersion: 2.0MaxDataServiceVersion: 2.0<\/pre>\n<h3>Fix<\/h3>\n<p>It is recommended to restrict access to sensitive functions or information by default.<br \/>Required access privileges should be granted explicitly by a global access control mechanism, which should be consistent regardless whether the backend is accessed via the application's frontend or API.<\/p>\n<h3>References<\/h3>\n<p><a href=\"https:\/\/cwe.mitre.org\/data\/definitions\/284.html\" target=\"_blank\" rel=\"noopener\">https:\/\/cwe.mitre.org\/data\/definitions\/284.html<\/a><br \/><a href=\"https:\/\/owasp.org\/Top10\/A01_2021-Broken_Access_Control\/\" target=\"_blank\" rel=\"noopener\">https:\/\/owasp.org\/Top10\/A01_2021-Broken_Access_Control\/<\/a><\/p>\n<h3>Timeline<\/h3>\n<ul>\n<li><strong>2023-10-04<\/strong>: Vulnerability identified by Ole Wagner of usd AG.<\/li>\n<li><strong>2023-10-05<\/strong>: First contact request via SAP's vulnerability disclosure form.<\/li>\n<li><strong>2023-10-25<\/strong>: Received an update by SAP that the incident is in internal review.<\/li>\n<li><strong>2023-11-14<\/strong>: The vulnerability was confirmed by SAP's security team and the vulnerable sample application was removed from the trial version.<\/li>\n<li><strong>2024-03-26:<\/strong> This advisory is released by usd AG.<\/li>\n<\/ul>\n<h3>Credits<\/h3>\n<p>This security vulnerability was identified by Ole Wagner 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-2023-0038 | Broken Access Control in SAP Fiori Sample Shop Advisory ID: usd-2023-0038Product: SAP Fiori Sample ShopAffected Version: Docker Image sapse\/abap-platform-trial:1909Vulnerability Type: CWE-284 (Improper Access Control)Security Risk: MEDIUM - CVSS:3.1\/AV:N\/AC:L\/PR:N\/UI:N\/S:U\/C:N\/I:L\/A:LVendor URL: https:\/\/www.sap.com\/Vendor Status: FixedCVE number: Not assignedLast Update: 2024-03-18 Affected Component SAP Trial docker container with pre-configured SAP Fiori Sample Shop Description SAP Fiori is [&hellip;]<\/p>\n","protected":false},"author":114,"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-22420","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/22420","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\/114"}],"replies":[{"embeddable":true,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/comments?post=22420"}],"version-history":[{"count":5,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/22420\/revisions"}],"predecessor-version":[{"id":22474,"href":"https:\/\/herolab.usd.de\/en\/wp-json\/wp\/v2\/pages\/22420\/revisions\/22474"}],"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=22420"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}