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·25 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

•2 days ago•CVE-2026-58254
6.5

CVE-2026-58254: Authorization Bypass in NATS Server Message Tracing for Leaf Node Connections

NATS Server prior to versions 2.12.8 and 2.14.3 contains an incorrect authorization vulnerability (CWE-863) in its message tracing subsystem. When evaluating whether a connection is permitted to publish trace events to a destination subject specified in the Nats-Trace-Dest header, the server only checks standard client permissions and omits permission checks for leaf node connections. This allows a connected leaf node operator with restricted publishing privileges to emit internal trace events to unauthorized subjects and suppress standard message delivery using the Nats-Trace-Only header.

Alon Barad
Alon Barad
10 views•10 min read
•2 days ago•CVE-2026-63341
7.5

CVE-2026-63341: Unauthenticated Denial of Service via Unbounded Topic Depth in Aedes MQTT Broker

CVE-2026-63341 is a high-severity Denial of Service (DoS) vulnerability in the Aedes MQTT broker for Node.js affecting all versions prior to 1.1.1. The flaw stems from missing input validation on the hierarchical depth of incoming MQTT topic strings before they are passed to the underlying topic-matching engine, qlobber. Because qlobber enforces a hardcoded limit of 100 topic levels and throws a synchronous exception when this threshold is exceeded, an attacker can send a single MQTT packet containing 101 or more forward-slash-separated levels to trigger an uncaught exception that immediately terminates the Node.js broker process.

Alon Barad
Alon Barad
14 views•12 min read
•2 days ago•CVE-2026-61725
6.1

CVE-2026-61725: Path Traversal and Arbitrary File Overwrite in sevenz-rust2

CVE-2026-61725 is a path traversal vulnerability (CWE-22) in the sevenz-rust2 Cargo package prior to version 0.21.1. The vulnerability occurs because the decompression utility fails to validate or sanitize archive entry filenames before joining them with the destination directory path via std::path::Path::join. An attacker who supplies a crafted 7z archive containing parent directory traversal sequences or absolute paths can write or overwrite arbitrary files on the host filesystem with the privileges of the extracting process.

Alon Barad
Alon Barad
6 views•12 min read
•2 days ago•CVE-2026-77309
8.8

CVE-2026-77309: Unauthenticated Remote Code Execution in NASA-AMMOS AIT-GUI via Incomplete File Cleanup and Path Traversal

CVE-2026-77309 (GHSA-jrjx-9jjw-747m) is a high-severity unauthenticated remote code execution vulnerability affecting NASA-AMMOS AIT-GUI versions 1.0.0 through 2.5.0. The flaw results from chaining an incomplete file cleanup error in the telemetry query endpoint (/tlm/query) with a directory traversal flaw in the script execution endpoint (/script/run). An attacker on an adjacent network can stage arbitrary Python statements into a static file on disk and execute that file under the privileges of the AIT-GUI web server process.

Amit Schendel
Amit Schendel
15 views•10 min read
•2 days ago•CVE-2026-77332
2.3

CVE-2026-77332: Surfaced-Memory Envelope Injection and Stored Prompt Injection in memtomem-stm

A vulnerability classified under CWE-116 (Improper Encoding or Escaping of Output) exists in memtomem-stm versions 0.1.0 through 0.1.33. The software acts as a Model Context Protocol (MCP) short-term memory proxy gateway for AI agent architectures. When surfacing retrieved memories and scratchpad items into downstream Large Language Model (LLM) context envelopes, the SurfacingFormatter component fails to properly sanitize untrusted memory attributes. An attacker with the ability to plant untrusted content into the agent's long-term or working memory store can inject arbitrary structural delimiters, close the <surfaced-memories> XML boundary prematurely, visually obscure instructions using Unicode bidirectional overrides, and execute stored prompt injection attacks against downstream LLM agents.

Alon Barad
Alon Barad
18 views•10 min read
•2 days ago•CVE-2026-77331
2.0

CVE-2026-77331: Race Condition and Session State Corruption in memtomem-stm

CVE-2026-77331 (GHSA-72jh-722p-rqr3) is a concurrency and session-state synchronization vulnerability in memtomem-stm, a short-term memory proxy gateway for AI agents. In versions 0.1.2 prior to 0.1.34, concurrent Model Context Protocol (MCP) Remote Procedure Call (RPC) failures or mid-flight task cancellations can initiate duplicate reconnect loops and permit dirty or cancelled transport sessions to be reused. This deficiency results in session-state integrity loss and local service degradation.

Amit Schendel
Amit Schendel
8 views•9 min read