Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2020-29007 PoC — LilyPond 代码注入漏洞

Source
Associated Vulnerability
Title:LilyPond 代码注入漏洞 (CVE-2020-29007)
Description:The Score extension through 0.3.0 for MediaWiki has a remote code execution vulnerability due to improper sandboxing of the GNU LilyPond executable. This allows any user with an ability to edit articles (potentially including unauthenticated anonymous users) to execute arbitrary Scheme or shell code by using crafted {{Image data to generate musical scores containing malicious code.
Description
Remote code execution in Mediawiki Score
Readme
**CVEID**: CVE-2020-29007

**Name of the affected product(s) and version(s)**: Mediawiki Score (all versions up to 0.3.0)

**Problem type**: CWE-96: Improper Neutralization of Directives in Statically Saved Code (‘Static Code Injection’)

---

**Summary**

Score is a Mediawiki extension which generates musical notation based on user-provided Lilypond or ABC markup.
During our tests, we have determined it is vulnerable to remote code execution through Scheme code embedded in
Lilypond markup.

All version of Score (up to and including 0.3.0) allow the execution of arbitrary user-controlled code within
the context of a webserver process.
 
**Description**
 
Score extension generates musical notation by passing user-controlled Lilypond or ABC markup to a GNU Lilypond binary.
Because the binary is executed without the -dsafe option, it will execute arbitrary Guile Scheme code embedded within
Lilypond markup, including the code which interacts with operating system shell.

To exploit this vulnerability, the attacker must be able to edit any article on the vulnerable wiki.
In most configurations, it should be possible for the unauthenticated attacker.

**Reproduction**

1. Start editing any article on a wiki.

2. Replace the articles contents with the following code:
```
{{Image frame|content=\new Staff <<{g^#
(number->string(system "/usr/bin/false"))
}>>}}
```

3. Click ‘show preview’

4. If the output contains an image which looks like this, the wiki is vulnerable:
![256](binfalse.png)
 
**Mitigation**

Disable Score extension.
File Snapshot

[4.0K] /data/pocs/915655c3526b4cb95dff5e0fae334d50ff4abbc5 ├── [5.7K] binfalse.png └── [1.5K] README.md 0 directories, 2 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →