A backdoor on a Ghost site is any way back in that you did not set up and would not approve: a staff account you do not recognise, an integration key you never created, a webhook sending your data elsewhere, or code sitting in a theme or on the server. Ghost has a small number of places where such things can hide, which makes a methodical check realistic. This guide walks through each place and then covers removal and credential rotation.
Start with your hosting model
Where the checks happen depends on how Ghost runs. Ghost is an open-source Node.js publishing platform, and you either self-host it (usually installed and managed with Ghost-CLI) or use the managed Ghost(Pro) service.
- Ghost(Pro): Ghost handles updates and the server. Your audit is limited to what you can see in Ghost Admin: staff, integrations, webhooks, code injection and themes.
- Self-hosted: You also own the server, the operating system, Node.js, the database and the Ghost files. Every Admin check applies, plus a server-side review.
Before you change anything, export your content and take a backup. On a self-hosted site, back up the database and the content folder. That gives you a clean record to compare against if you need to restore.
Check staff accounts and roles
In Ghost Admin, open Settings and go to the Staff area. Ghost lists every user and their role. The standard roles are Owner, Administrator, Editor, Author and Contributor.
Look for:
- Users you do not recognise, especially Administrators.
- Former contractors, agencies or employees who still have access.
- Roles higher than the person needs. An Editor or Author rarely needs Administrator rights.
- Invitations that are still pending for addresses you do not know.
Also confirm who the Owner is and that the email address on that account is one you control. An attacker who changes an account email can use password reset to take over the account.
Review integrations, API keys and webhooks
Ghost’s Integrations settings are the most common place to find access you did not intend. Built-in integrations connect services you chose to enable. Custom integrations each carry an Admin API key and a Content API key, and they can have webhooks attached.
The Admin API key can change your site, so treat it like a password. For every custom integration, ask:
- Do you know who created it and what it is for?
- Is the service that uses it still in use?
- Do its webhooks point to endpoints you recognise?
A webhook fires when an event such as a post being published or a member being added occurs, and it sends details of that event to a URL. A webhook pointing at an unfamiliar address is a reason to investigate, because it may be copying content or member data out of your site.
Also review the connected services listed there, such as automation tools, newsletters or payment connections, and disconnect any you no longer use. If your site has paid memberships, check the payment provider’s own dashboard for connected apps and API keys too, since that account sits outside Ghost.
Look for injected or modified code
Ghost lets you add custom code in several places, so check them all.
- Code injection: Under Settings, the site-wide Code injection area has a header and a footer field. Look for script tags or snippets you did not add, particularly ones loading files from unknown domains or containing long unreadable strings.
- Per-post and per-page code injection: Individual posts and pages have their own header and footer fields in the post settings. A malicious snippet can sit on a single old article and never show up in the site-wide field.
- Themes: Open the Design settings and note which theme is active and which others are installed. Download the active theme and review its files, especially the default template, the partials and any JavaScript. Compare it against the original from where you obtained it, or against your own version control.
- Navigation and redirects: Check navigation links for destinations you did not set. If you use a redirects file, read it, because a redirect can quietly send visitors, or search traffic, to another site.
Delete themes you no longer use. Fewer installed themes means fewer files to audit.
Inspect the server (self-hosted only)
If you self-host, the same attention has to go to the machine. Ghost(Pro) customers can skip this section, since the platform is managed for you.
- Ghost status and health: Run ghost ls to see your installed instances and ghost doctor to check the environment. Confirm Ghost and Node.js are on supported versions, because you are responsible for updating both.
- Logs: Review the Ghost logs and your web server logs for repeated failed logins, sign-ins at odd hours, or requests to admin and API routes from unfamiliar addresses.
- Files: Look in the content folder for files that should not be there, such as scripts in the images or files directories, or recently changed files you did not change. Compare against your last known good backup.
- Server accounts and tasks: Check SSH authorised keys, system user accounts and scheduled jobs (cron) for entries you did not create.
- Configuration: Read the production config file for unfamiliar mail, storage or database settings.
If you find signs of a compromised server rather than just a Ghost account, the safest path is usually to rebuild from a clean install and restore only your content, instead of trying to clean the existing machine.
Remove access and rotate credentials
Work through removal in a sensible order so the person or script that got in cannot simply return.
- Remove unknown staff users and lower any over-privileged roles.
- Change passwords for every remaining staff account, starting with the Owner and Administrators. Use a unique password for each, stored in a password manager, and review any device or sign-in verification options your version of Ghost offers.
- Delete suspicious custom integrations. For integrations you still need, regenerate the keys if your Ghost version offers it, or delete and recreate the integration, then update the tool that uses it.
- Delete unknown webhooks and review the ones you keep.
- Clean code injection and themes. Remove unknown snippets from site-wide and per-post fields, and re-upload a clean copy of your theme from a trusted source.
- Rotate outside credentials that Ghost uses: your email sending service, payment provider keys and, if self-hosted, the database password, the server login and any SSH keys.
- Update Ghost and Node.js if you self-host, so the original way in is closed.
Rotate in this order because changing a password while a hostile integration or key is still active leaves a route open.
Make the next check easier
A repeatable routine catches problems earlier. Keep a short written list of the staff users, integrations and webhooks that should exist, and compare it each quarter. Keep your theme in version control so changes show up as a clear difference. Limit Administrator access, and remove accounts as soon as someone leaves. The official Ghost documentation describes each of the Admin areas mentioned above, and the OWASP Top Ten is a useful reference for the broader categories of web application risk.
Frequently asked questions
Does Ghost(Pro) need a server-level check?
No. Ghost manages the servers and platform updates for Ghost(Pro). Your checks cover what you control inside Ghost Admin: staff, integrations, webhooks, code injection and themes, plus the external accounts connected to your site.
How can I tell if a theme has been tampered with?
Download the installed theme and compare it with the original copy or the version in your repository. Any file that differs and that you did not change deserves a close look, particularly JavaScript and anything that loads resources from another domain.
Should I rotate keys even if I find nothing?
If you cannot account for every integration or former team member who had access, rotating keys and passwords is a low-cost precaution. Do it for any key that was shared in chat, email or a public repository.