Skip to content

Cybersecurity

CVE-2020-29007 - remote code execution in MediaWiki Score

The Score extension for MediaWiki ran LilyPond without process isolation, so a user with edit rights could execute Scheme or shell code on the server.

Józef SulwińskiJózef Sulwiński

Published Updated 3 min read

CVERCEMediaWikicode injectionvulnerability research
CVE-2020-29007 - remote code execution in MediaWiki Score
Contents
  1. Vulnerability details
  2. Description
  3. Impact
  4. Remediation
  5. Where we help
  6. Sources

On a wiki where anyone can edit pages, the Score extension allowed code execution on the MediaWiki server. Score generates music notation from descriptions in LilyPond or ABC format. The NVD record and the MediaWiki advisory show that:

  • the flaw was present in Score up to and including version 0.3.0, which is the latest version,
  • the extension ran LilyPond without process isolation,
  • anyone with the right to edit articles could execute code, and on wikis open to editing so could an anonymous user,
  • the CISA Known Exploited Vulnerabilities catalog does not list this CVE.

Vulnerability details

Parameter Value
CVE ID CVE-2020-29007
Product MediaWiki Score (all versions up to and including 0.3.0)
Type CWE-94: Improper Control of Generation of Code (according to NVD)
Impact Execution of arbitrary Scheme or shell code on the server
CVSS 9.8 (critical, CVSS 3.1: AV:N/AC:L/PR:N/UI:N). The score assumes an unauthenticated attack, so the required conditions differ on a wiki with restricted editing.

Description

The Score extension passes music notation descriptions from content editors to the LilyPond program. LilyPond supports an embedded Scheme language (a Lisp dialect) and can execute code. The extension ran it without process isolation, so a crafted description executed Scheme or shell code on the server.

Filtering the input does not solve the problem. LilyPond’s safe mode had known bypasses, and LilyPond 2.23.12 removed it entirely. MediaWiki states that LilyPond must not process arbitrary input without containment, even with safe mode enabled.

Impact

  • A user with edit rights, and sometimes an anonymous one, executes arbitrary Scheme or shell code on the MediaWiki server.
  • The extent of the consequences depends on the privileges of the process running LilyPond and on its isolation.

Remediation

The Score extension has no version newer than 0.3.0, so the fix is not an update of the extension. MediaWiki recommends running LilyPond through Shellbox, a separate service that isolates external programs. It also recommends LilyPond 2.22.0 or newer, or a distribution package with the fixes, and the Score version from the REL1_36 branch, to which the fixes were backported. Firejail should be updated to version 0.9.62.2 if the wiki uses it. When the administrator does not trust all editors and Shellbox is not in use, Score should be disabled, because any editor can then run code on the server.

The MediaWiki advisory also lists CVE-2020-17353 and CVE-2020-17354 (LilyPond) and CVE-2020-17367 and CVE-2020-17368 (Firejail). In July 2020 Wikimedia disabled Score on its wikis, and in August 2021 it re-enabled the extension after isolating LilyPond in Shellbox. The extension page now states that Score is disabled across all Wikimedia wikis because of a known technical issue.

Maciej Miszczyk of SEQRED reported the flaw. The MediaWiki advisory ties Wikimedia’s July 2020 disabling of Score to this report.

Where we help

During penetration testing the SEQRED team examines software and devices, including auxiliary tools and web application extensions. To start a conversation, use the contact form.

Sources

  1. CVE-2020-29007 - NVD - NIST (accessed: )
  2. Extension:Score/2021 security advisory - MediaWiki (accessed: )
  3. Extension:Score - MediaWiki (accessed: )
  4. Known Exploited Vulnerabilities Catalog (release 2026.11.18) - CISA (accessed: )

Need help in this area?

Our experts will help you assess the risk and plan next steps.

Talk to an expert

We'll discuss scope, methodology, and timeline.

Book a call