CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-53945

CVE-2026-53945: Time-of-Check to Time-of-Use (TOCTOU) DNS Rebinding Server-Side Request Forgery in Ghost CMS

Amit Schendel
Amit Schendel
Senior Security Researcher

Aug 5, 2026·7 min read·20 visits

Executive Summary (TL;DR)

A DNS Rebinding vulnerability in Ghost CMS allows attackers to bypass private IP blocklists and execute SSRF requests against local networks due to a TOCTOU race condition between request validation and socket establishment.

Ghost CMS is vulnerable to Server-Side Request Forgery (SSRF) in versions 6.0.9 through 6.21.1. Due to a Time-of-Check to Time-of-Use (TOCTOU) race condition in its outbound fetch validation logic, an attacker can bypass IP blocklists via DNS Rebinding. This allows unauthorized interaction with private networks and local services.

Vulnerability Overview

Ghost CMS utilizes an external HTTP client wrapper helper called externalRequest to handle outbound calls. These outbound calls support features such as webhook dispatching, Unsplash media imports, and external integration integrations. To prevent Server-Side Request Forgery (SSRF) attacks, the application implements restrictions to block outbound connections targeting private IP blocks, local subnets, and cloud instance metadata services.

In vulnerable versions of Ghost CMS (ranging from 6.0.9 up to but not including 6.21.1), these filters were implemented within high-level pre-request hooks provided by the got library. Specifically, these hooks executed DNS lookup operations on target hostnames to verify that the resolved IP addresses did not belong to private networks. If a domain was verified as public, the HTTP client proceeded to execute the connection.

This architecture introduced a classic Time-of-Check to Time-of-Use (TOCTOU) vulnerability. Because the validation check and the actual TCP socket connection occurred as separate sequential events, the target domain IP address could change between the two operations. Attackers could exploit this gap using DNS Rebinding techniques to force Ghost to connect to restricted network interfaces.

Root Cause Analysis

The root cause of this vulnerability lies in the separation of DNS resolution during the security validation phase and the socket connection phase. Ghost's hook-based validation relied on errorIfHostnameResolvesToPrivateIp executing dns.lookup before allowing the client library to proceed. However, the got client does not lock or persist the resolved IP address for the downstream network call handled by Node's native HTTP module.

Under normal circumstances, the operating system caches DNS responses, making the second resolution identical to the first. When an attacker sets up a custom domain name pointed to an authoritative nameserver under their control, they can configure the nameserver to return a Time-To-Live (TTL) value of zero. This instructs downstream DNS caches to discard the resolution records immediately after use.

When Ghost resolves the domain during the validation hook phase, the attacker's server responds with a benign public IP address (such as 8.8.8.8). The hook accepts this IP and validates the request. Because the TTL is zero, the subsequent connection setup inside Node's native networking layer must perform another DNS query. On this second lookup, the attacker's nameserver returns a loopback or private IP address (such as 127.0.0.1 or 169.254.169.254). Node's native socket connection module establishes a TCP channel directly to the private target, bypassing all security logic.

Vulnerability Workflow

The execution flow of a successful DNS rebinding exploit follows a synchronized lifecycle. The application first performs validation checks on a hostname that resolves to a safe public IP address. Immediately after passing the validation check, the application establishes a socket connection to a newly resolved private target address.

This diagram demonstrates how the two lookup actions function independently. The security hook runs in the user-space runtime environment, while the final connection resolution occurs inside Node's networking layer. The separation of these operations allows the validation boundaries to be bypassed.

Code Analysis

The vulnerable code path utilized high-level validation hooks that ran asynchronously before the connection phase. This meant that the application had no control over the IP address selected when the native runtime performed the socket connection. To address this, the patch introduced the installSafeDnsLookup configuration helper to intercept DNS queries directly at the runtime's execution layer.

function installSafeDnsLookup(options) {
    if (config.get('env') === 'development') {
        return;
    }
 
    const siteUrl = new URL(config.get('url'));
    if (options.url.host === siteUrl.host) {
        return;
    }
 
    const requestHref = options.url.href;
    // Injecting options.lookup forces validation during socket creation
    options.lookup = (hostname, dnsOpts, callback) => {
        if (typeof dnsOpts === 'function') {
            callback = dnsOpts;
            dnsOpts = {};
        }
        dns.lookup(hostname, dnsOpts, (err, addressOrResult, family) => {
            if (err) {
                return callback(err, addressOrResult, family);
            }
            if (dnsOpts && dnsOpts.all) {
                const results = addressOrResult;
                for (const entry of results) {
                    if (isPrivateIp(entry.address)) {
                        return callback(new errors.InternalServerError({
                            message: 'URL resolves to a non-permitted private IP block',
                            code: 'URL_PRIVATE_INVALID',
                            context: requestHref
                        }));
                    } 
                }
                return callback(null, results);
            }
            if (isPrivateIp(addressOrResult)) {
                return callback(new errors.InternalServerError({
                    message: 'URL resolves to a non-permitted private IP block',
                    code: 'URL_PRIVATE_INVALID',
                    context: requestHref
                }));
            }
            callback(null, addressOrResult, family);
        });
    };
}

By injecting the custom options.lookup handler directly into Node's internal http.request() configurations, the patch enforces validation at the lowest connection level. Because Node uses the IP address returned by this specific lookup callback to open the TCP socket, the IP validated inside isPrivateIp is identical to the one targeted for the connection, closing the TOCTOU gap.

Review of this fix reveals that the protection is bypassed when config.get('env') === 'development'. Production instances incorrectly configured to execute in development mode remain vulnerable. Additionally, connections targeting the host matching the configured site URL bypass this protection entirely, which could introduce risks if host headers can be manipulated.

Exploitation Methodology

To exploit this vulnerability, an attacker must register a domain name and deploy a custom authoritative DNS server. The DNS server must dynamically return different IP addresses for the target domain depending on the query index. When a lookup query is made, the DNS server alternates between a public IP address and an internal IP address.

Once the custom DNS infrastructure is operational, the attacker triggers an action in Ghost CMS that initiates an outbound request. This can be achieved by submitting the custom domain to a integration endpoint, adding custom webhooks, or utilizing the Unsplash media import interface. Ghost initiates the validation hook, which query the domain and receives the safe public IP, allowing the request to proceed.

Immediately following validation, Node's network module executes the second DNS query to open the connection. The DNS server responds with the private IP block (such as 169.254.169.254 for AWS instance metadata). Ghost establishes the connection to the internal service, allowing the attacker to interact with local APIs, access internal metrics, or extract cloud credentials.

Remediation and Defense

To resolve the vulnerability, self-hosted administrators must upgrade Ghost CMS to version 6.21.1 or later. The update implements the low-level custom DNS resolution callback to ensure that the IP address checked for private range restrictions is the same address used for network connections.

When immediate upgrades are not possible, administrators should implement host-level or network-level firewall rules. Applying rules to block outbound traffic originating from the Ghost process or container targeting local loopback subnets (127.0.0.0/8, ::1) or private subnets (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) prevents outbound requests from reaching restricted endpoints. Link-local metadata interfaces (169.254.169.254) must also be blocked.

Organizations should also verify that their environment configurations are secure. Ensure that NODE_ENV is explicitly configured to production across all deployment manifests, as the SSRF validation logic is completely disabled in development mode.

Official Patches

TryGhostGhost core repository security patch resolving outbound validation gaps.

Fix Analysis (1)

Technical Appendix

CVSS Score
4.0/ 10
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N
EPSS Probability
0.14%
Top 96% most exploited

Affected Systems

Ghost CMS self-hosted deployments running versions 6.0.9 through 6.21.0

Affected Versions Detail

Product
Affected Versions
Fixed Version
Ghost
TryGhost
>= 6.0.9, < 6.21.16.21.1
AttributeDetail
CWE IDCWE-367 (TOCTOU), CWE-918 (SSRF)
Attack VectorNetwork (Unauthenticated SSRF)
CVSS Score4.0 (Medium)
EPSS Score0.00140 (0.14%)
Exploit StatusProof of Concept / Technical Analysis available
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1005Data from Local System
Collection
CWE-367
Time-of-Check to Time-of-Use (TOCTOU) Race Condition

A Time-of-Check to Time-of-Use (TOCTOU) condition occurs when a security check is executed on a resource, but the resource changes before it is used by the application.

Vulnerability Timeline

Security fix authored and merged into development branches
2026-03-10
Vulnerability details disclosed and CVE-2026-53945 assigned
2026-06-24

References & Sources

  • [1]GitHub Security Advisory GHSA-ch52-px8q-f22j
  • [2]NVD - CVE-2026-53945 Details

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 1 hour ago•CVE-2026-107397
4.4

CVE-2026-107397: Stored Cross-Site Scripting via Collaborative Editor Conflict Resolution and Custom Link Fields in Indico

A technical analysis of CVE-2026-107397, a stored Cross-Site Scripting (XSS) vulnerability in Indico's collaborative notes editor and custom link generation fields. Prior to version 3.3.13, Marshmallow serialization schemas omitted HTML sanitization during conflict resolution, and form validators failed to enforce strict URI schemes, enabling authenticated low-privilege attackers to execute arbitrary JavaScript.

Alon Barad
Alon Barad
0 views•7 min read
•about 2 hours ago•CVE-2026-107395
4.3

CVE-2026-107395: Missing Authorization in Indico Legacy Session Export API

An authorization bypass vulnerability exists in the legacy session export API of Indico, an open-source event management system developed at CERN. Due to a missing object-level access check, authenticated users can bypass configuration-level restrictions to extract private session metadata (including session titles, descriptions, and list of conveners) from events that they are otherwise authorized to view.

Alon Barad
Alon Barad
5 views•5 min read
•about 3 hours ago•CVE-2026-107394
6.8

CVE-2026-107394: Server-Side Request Forgery Bypass via Parser Differential in Indico

An incomplete Server-Side Request Forgery (SSRF) validation check in Indico prior to version 3.3.13 allows authenticated event organizers to bypass outbound network restrictions. By utilizing backslash characters within crafted URLs, attackers can exploit a parser differential between the application's validator and the downstream HTTP client library to access internal network resources.

Alon Barad
Alon Barad
5 views•6 min read
•about 4 hours ago•CVE-2026-107717
6.5

CVE-2026-107717: Chat Role Injection and Prompt Boundary Bypass in Banks Library

CVE-2026-107717 represents a critical prompt boundary bypass and chat role injection vulnerability in the Banks Python package (versions prior to 2.5.0). The library parses generated template outputs line-by-line, attempting to validate each segment as a JSON-serialized ChatMessage object without validating the source boundaries of the text. If an application integrates user input directly into a prompt template, a remote, unauthenticated attacker can supply multi-line inputs with structured JSON payloads. This input is then parsed as high-privilege system instructions or tool execution responses, completely hijacking downstream Large Language Model behavior.

Alon Barad
Alon Barad
8 views•6 min read
•about 5 hours ago•CVE-2026-107716
7.3

CVE-2026-107716: Path Traversal and Link Following in banks DirectoryPromptRegistry

Improper pathname limitation and link resolution (CWE-22 and CWE-59) in the banks library prior to version 2.5.1 allow local attackers to read or write arbitrary files via crafted symbolic links in the prompt directory registry.

Amit Schendel
Amit Schendel
8 views•7 min read
•about 6 hours ago•CVE-2026-107726
9.3

CVE-2026-107726: Unrestricted Deserialization in Hazelcast Zero Config Compact Serialization

Improper validation of dynamic class resolution within Hazelcast's Zero Config Compact Serialization allows unauthenticated clients to trigger reflective class instantiation. This flaw can be exploited to read arbitrary JVM heap or off-heap memory, crash cluster nodes, or achieve arbitrary code execution under specific classpath conditions. This issue is resolved in Hazelcast versions 5.4.5, 5.5.10, 5.6.1, and 5.7.0.

Alon Barad
Alon Barad
6 views•6 min read