GitHub Advisoryadvisory · Maven

GHSA-9gwx-9cwp-5c2m Billion laughs attack (XML bomb)

HIGH Published 2021-06-17 Modified 2021-10-21 Official page ↗
Aliases
CVE-2021-32623
Ecosystem
Maven
Packages
org.opencastproject:opencast-kernel
Severity
High
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
Weaknesses
CWE-776
Reviewed
2021-06-16

Affected packages

• Maven org.opencastproject:opencast-kernel: < 9.6 → fixed in 9.6

Description

Impact Opencast is vulnerable to the Billion laughs attack which allows an attacker to easily execute a (seemingly permanent) denial of service attack, essentially taking down Opencast using a single HTTP request. Consider an XML file (`createMediaPackage.xml`) like this: ```xml ]> &lol5; ``` Throwing this at Opencast will cause Opencast to parse the XML and expand the Lorem Ipsum about 100 000 times, instantly consuming a huge amount of memory: ```sh curl -i -u admin:opencast https://develop.opencast.org/ingestdownload/ingestdownload \ -F 'mediapackage=<createMediaPackage.xml' \ -F sourceFlavors="" \ -F sourceTags="" \ -F deleteExternal="" \ -F tagsAndFlavor='' \ -o out.xml ``` Additional notes: • You can likely use other endpoints accepting XML (this was just the first one I tried) and depending on how much memory you want to consume, you might want to enlarge the lorem ipsum text. • Opencast's XML parser does limit the expansion to 100 000 times, already limiting the attack. Nevertheless, this can already harm the system. • To exploit this, users need to have ingest privileges, limiting the group of potential attackers Patches The problem has been fixed in Opencast 9.6. Older versions of Opencast are not patched sue to the extent of this patch. Workarounds There is no known workaround for this issue. References • Billion laughs attack explained • For technical details, take a look at the patch fixing the issue: https://github.com/opencast/opencast/commit/_________ For more information If you have any questions or comments about this advisory: • Open an issue in our issue tracker • Email us at [email protected]

Related

Alias · CVE (1)

  • CVE-2021-32623 Opencast is a free and open source solution for automated video capture and distribution. vulnerability

Weakness · CWE (1)

  • CWE-776 Improper Restriction of Recursive Entity References in DTDs weakness

References