Skip to content
SQL injection Write-up Advanced

Ghost Stories: investigating an undocumented ClickFix C2 in Ghost CMS

A SQL injection in Ghost CMS's public Content API let attackers read the stored Admin API key, then use that key to write a JavaScript loader into stored post content. Visitors to infected articles were shown a fake CAPTCHA that tried to trick them into running commands or installing malware.

claudio bono Follow

Published on blog.sicuranext.com

Ghost is a widely used CMS for blogs and newsletters. CVE-2026-26980 is a SQL injection in its public Content API.

claudio bono, on blog.sicuranext.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a SQL injection in the public Content API allowed reading the Admin API key from the database, which then gave write access through the separate Admin API.

Impact

Visitors to compromised articles could be tricked into running commands or installing malware; the loader survives a Ghost upgrade, and a suspended C2 does not clean the site.

What the attacker needed

Ghost 3.24.0 to 6.19.0 exposed online; No authentication needed for the Content API; Victim visits an infected article

The fix

Sites should be patched to 6.19.1, have the Admin API key rotated, and have the injected content cleaned, because updating alone does not remove the stored loader.

How it was found

  1. Query the public Content API to read the site's stored Admin API key.
  2. Use the key to authenticate to the Admin API.
  3. Edit stored posts in bulk to insert the loader script into their bodies.
  4. When a visitor opens an infected article, the loader fetches second-stage code from the C2.
  5. The second stage shows a fake 'verify you are human' prompt to the visitor.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Ghost is a blogging platform. Its public Content API is meant to be readable by anyone, but a bug let an attacker use it to read a secret key stored in the site's database. With that key they could edit posts and slip a script into articles, so visitors saw a fake 'prove you are human' prompt designed to make them install malware.

What is SQL injection?

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.

Similar reports

View all

Same bug class and techniques, clearest first.

SQL injection

The lesson behind this report.

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.