Vulnerabilities in pkg:npm/@payloadcms/db-sqlite

PACKAGE
Advisory Identifier: GHSA-pj7x-6wpf-pgvp
Advisory Summary

CVE-2026-105856 is a HIGH sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Payload libraries in the npm ecosystem. The issue involves sql injection in sqlite/postgres. Remediation is available by upgrading affected packages to version 3.90.0, 3.73.0, 4.0.0-canary.34.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@payloadcms/db-sqlite

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@payloadcms/db-sqlite. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-pj7x-6wpf-pgvp CVE-2026-105856 HIGH Payload: SQL injection in SQLite/Postgres

CVE-2026-105856 at a Glance

CVE Identifier CVE-2026-105856
GHSA Identifier GHSA-pj7x-6wpf-pgvp
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Affected Product Payload
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2026-105856

To remediate this vulnerability, upgrade all affected Payload dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@payloadcms/db-sqlite fixed: 3.90.0
npm install @payloadcms/db-sqlite@3.90.0
@payloadcms/db-d1-sqlite fixed: 3.90.0
npm install @payloadcms/db-d1-sqlite@3.90.0
@payloadcms/db-postgres fixed: 3.73.0
npm install @payloadcms/db-postgres@3.73.0
@payloadcms/db-vercel-postgres fixed: 3.73.0
npm install @payloadcms/db-vercel-postgres@3.73.0
@payloadcms/db-sqlite fixed: 4.0.0-canary.34
npm install @payloadcms/db-sqlite@4.0.0-canary.34
@payloadcms/db-d1-sqlite fixed: 4.0.0-canary.34
npm install @payloadcms/db-d1-sqlite@4.0.0-canary.34
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @payloadcms/db-sqlite

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-105856, inspect your project dependencies using npm:

npm ls @payloadcms/db-sqlite

Analyze the terminal output to locate any version of Payload in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.90.0), your application is affected.

Note: The npm ls @payloadcms/db-sqlite command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. In Payload, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact An attacker who has read plus create or update access to a collection can submit a request that includes a SQL injection targeting a specific field path shape and operators in Payload's SQLite and Postgres. #### You are affected if: - You use `@payloadcms/db-sqlite` or `@payloadcms/db-d1-sqlite`. - You use `@payloadcms/db-postgres` or `@payloadcms/db-vercel-postgres` `< 3.73.0`. - A readable collection has a `json` field, or a` blocks` field with `blocksAsJSON: true`. - The attacker has read plus create or update access on it. #### You are not affected if: - You have no `json or `blocksAsJSON` fields. `richText` is not affected. - You run a patched version. ### Patches The patched version sanitizes the query input to prevent injection. Users should upgrade Payload packages to `>= 3.90.0` or `>= 4.0.0-canary.34`.

CVE-2026-105856 Affected Payload Versions

6 component(s)
Fixed Versions:
3.90.03.73.04.0.0-canary.34
Product / Package Ecosystem Affected Versions Fixed Version
@payloadcms/db-sqlite
npm
≥ 3.0.0
< 3.90.0
3.90.0
@payloadcms/db-d1-sqlite
npm
≥ 3.0.0
< 3.90.0
3.90.0
@payloadcms/db-postgres
npm
≥ 3.0.0
< 3.73.0
3.73.0
@payloadcms/db-vercel-postgres
npm
≥ 3.0.0
< 3.73.0
3.73.0
@payloadcms/db-sqlite
npm
≥ 4.0.0-canary.0
< 4.0.0-canary.34
4.0.0-canary.34
@payloadcms/db-d1-sqlite
npm
≥ 4.0.0-canary.0
< 4.0.0-canary.34
4.0.0-canary.34

References

Frequently Asked Questions

What is CVE-2026-105856?
CVE-2026-105856 is a security vulnerability in Payload involving SQL injection in SQLite/Postgres under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
Which Payload versions are affected?
Affected versions include releases prior to 3.90.0, 3.73.0, 4.0.0-canary.34 across affected packages: @payloadcms/db-sqlite, @payloadcms/db-d1-sqlite, @payloadcms/db-postgres, @payloadcms/db-vercel-postgres.
What version fixes CVE-2026-105856?
Upgrading to 3.90.0, 3.73.0, 4.0.0-canary.34 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @payloadcms/db-sqlite affected?
Yes, @payloadcms/db-sqlite is affected in releases prior to 3.90.0, 4.0.0-canary.34. Upgrade your dependency to 3.90.0, 4.0.0-canary.34 or later.
Is @payloadcms/db-d1-sqlite affected?
Yes, @payloadcms/db-d1-sqlite is affected in releases prior to 3.90.0, 4.0.0-canary.34. Upgrade your dependency to 3.90.0, 4.0.0-canary.34 or later.
What CWE is associated with CVE-2026-105856?
CVE-2026-105856 is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') (The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.).
How can I check npm dependencies for CVE-2026-105856?
Run the dependency tree command: 'npm ls @payloadcms/db-sqlite'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-pj7x-6wpf-pgvp",
  "modified" : "2026-10-07T20:30:04Z",
  "published" : "2026-10-07T20:30:04Z",
  "aliases" : [ "CVE-2026-105856" ],
  "summary" : "Payload: SQL injection in SQLite/Postgres",
  "details" : "### Impact\n\nAn attacker who has read plus create or update access to a collection can submit a request that includes a SQL injection targeting a specific field path shape and operators in Payload's SQLite and Postgres.\n\n#### You are affected if:\n\n- You use `@payloadcms/db-sqlite` or `@payloadcms/db-d1-sqlite`.\n- You use `@payloadcms/db-postgres` or `@payloadcms/db-vercel-postgres` `< 3.73.0`.\n- A readable collection has a `json` field, or a` blocks` field with `blocksAsJSON: true`.\n- The attacker has read plus create or update access on it.\n\n#### You are not affected if:\n- You have no `json or `blocksAsJSON` fields. `richText` is not affected.\n- You run a patched version.\n\n### Patches\n\nThe patched version sanitizes the query input to prevent injection.\n\nUsers should upgrade Payload packages to `>= 3.90.0` or `>= 4.0.0-canary.34`.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@payloadcms/db-sqlite"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.90.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@payloadcms/db-d1-sqlite"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.90.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@payloadcms/db-postgres"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.73.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@payloadcms/db-vercel-postgres"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.73.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@payloadcms/db-sqlite"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0-canary.0"
      }, {
        "fixed" : "4.0.0-canary.34"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@payloadcms/db-d1-sqlite"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0-canary.0"
      }, {
        "fixed" : "4.0.0-canary.34"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/payloadcms/payload/security/advisories/GHSA-pj7x-6wpf-pgvp"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-105856"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/payloadcms/payload/commit/03b78c7e0901d19c67f07bdf6396a276010adbcc"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/payloadcms/payload"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/payloadcms/payload/releases/tag/v3.90.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-89" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-10-07T20:30:04Z",
    "nvd_published_at" : "2026-10-06T17:17:21Z"
  }
}