Skip to main content
Vulnerability Database/CVE-2026-105845

CVE-2026-105845: Payload CMS SQL Injection Vulnerability

CVE-2026-105845 is a SQL injection flaw in Payload CMS that allows untrusted users to execute malicious queries through dynamic filters or joins in SQLite and Postgres adapters. This article covers technical details, affected versions, and mitigation.

Published:

CVE-2026-105845 Overview

CVE-2026-105845 is a SQL injection vulnerability [CWE-89] in Payload, an open source headless content management system. Affected versions include Payload 3.0.0 through versions before 3.88.0 and canary releases before 4.0.0-canary.27. An untrusted user who can query readable collections through dynamic filters or joins can craft a request that triggers SQL injection against the SQLite and Postgres database adapters. The flaw allows attackers to manipulate backend queries without authentication, exposing data integrity and confidentiality. Payload has released fixes in versions 3.88.0 and 4.0.0-canary.27.

Critical Impact

Unauthenticated attackers can inject arbitrary SQL into Payload CMS queries, leading to data exfiltration, modification, or full database compromise.

Affected Products

  • Payload CMS versions 3.0.0 through 3.87.x (SQLite adapter)
  • Payload CMS versions 3.0.0 through 3.87.x (Postgres adapter)
  • Payload CMS canary versions prior to 4.0.0-canary.27

Discovery Timeline

  • 2026-10-06 - CVE-2026-105845 published to NVD
  • 2026-10-06 - Last updated in NVD database

Technical Details for CVE-2026-105845

Vulnerability Analysis

The vulnerability resides in Payload CMS query handling for the SQLite and Postgres database adapters. When a user submits a request against a readable collection using dynamic filters or join parameters, untrusted input is incorporated into SQL statements without sufficient sanitization. The flaw is network-accessible, requires no authentication, and does not require user interaction. Any client capable of reaching Payload's query interface can issue a crafted payload that alters the structure of the generated SQL.

Because Payload collections frequently expose read access to anonymous or low-privilege users by default, the attack surface extends to public-facing API endpoints. Successful exploitation lets attackers extract records beyond their intended access, bypass access control filters, or in some configurations modify data.

Root Cause

The root cause is improper neutralization of special elements used in SQL commands [CWE-89]. Dynamic filter and join parameters supplied by callers are concatenated or interpolated into queries built by the SQLite and Postgres adapters rather than being safely bound as parameters. This permits attacker-controlled fragments to reach the SQL execution layer intact.

Attack Vector

Exploitation occurs over the network against the Payload CMS REST or GraphQL query interface. An attacker crafts a request that specifies malicious filter conditions or join expressions targeting a readable collection. The adapter translates the attacker-controlled input into a SQL query, which the backend database executes. No credentials or elevated privileges are required when collections permit public read access.

text
// Patch excerpt from Payload CMS commit a742140ab4fca3160f7f83e9e7d996552ffc3b5a
 import Link from 'next/link'
 import { useRouter, useSearchParams } from 'next/navigation'
+import { getSafeRedirect } from 'payload/shared'
 import React, { useCallback, useRef, useState } from 'react'
 import { useForm } from 'react-hook-form'

Source: Payload CMS Security Commit a742140

Detection Methods for CVE-2026-105845

Indicators of Compromise

  • Unusual query parameters containing SQL keywords (UNION, SELECT, --, ;, OR 1=1) in requests to Payload collection endpoints.
  • Database error messages or stack traces returned from /api/* collection routes indicating malformed SQL.
  • Elevated query volume or long-running SQL statements originating from the Payload application user.

Detection Strategies

  • Inspect application and reverse-proxy logs for crafted where, filter, or joins query parameters targeting readable collections.
  • Enable SQL statement logging on Postgres and SQLite backends and alert on syntactically anomalous queries.
  • Deploy a web application firewall rule set to flag SQL injection payloads directed at Payload API routes.

Monitoring Recommendations

  • Monitor Payload CMS version strings in deployment manifests and container images to confirm patched builds are running.
  • Track outbound data volumes from the database host to detect bulk extraction attempts.
  • Correlate authentication logs with query anomalies to distinguish authenticated abuse from anonymous exploitation.

How to Mitigate CVE-2026-105845

Immediate Actions Required

  • Upgrade Payload CMS to version 3.88.0 or 4.0.0-canary.27 without delay.
  • Audit collection access configuration and restrict anonymous read access where business requirements allow.
  • Review recent application and database logs for signs of prior exploitation using crafted filter or join parameters.

Patch Information

The Payload maintainers released fixes in version 3.88.0 and canary 4.0.0-canary.27. Details are documented in the GitHub Security Advisory GHSA-v49j-62m6-pgrr and the Payload v3.88.0 Release Notes. The remediation commit is available at GitHub Commit a742140.

Workarounds

  • Restrict access to readable collections by requiring authentication and tightening the access function on affected collections.
  • Place a web application firewall in front of the Payload API to filter SQL injection patterns in query parameters.
  • Disable or constrain the use of dynamic filters and joins on collections that do not require them until the patch is deployed.
bash
# Upgrade Payload CMS to a patched release
npm install payload@3.88.0
# Or for canary users
npm install payload@4.0.0-canary.27

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.