Secure Your Payload CMS: Patching Two Critical Vulnerabilities Disclosed in 2026
If you’re running Payload CMS in production, two critical security vulnerabilities disclosed in early 2026 demand your immediate attention. CVE-2026-34751 (CVSS 9.1) allows unauthenticated attackers to hijack password reset flows and take over user accounts, while CVE-2026-34747 (CVSS 8.5) exposes a high-severity SQL injection vector. Here’s a step-by-step guide to auditing and hardening your Payload CMS installation.
Step 1: Check Your Current Payload CMS Version
Before anything else, determine which version of Payload you’re running:
cat package.json | grep payload
npm list payload
If you’re on any version prior to v3.79.1, you are vulnerable to both CVEs. Upgrade immediately.
Step 2: Upgrade to Payload CMS v3.81.0 (Latest)
The Payload team has patched both vulnerabilities. The minimum safe version is v3.79.1, but upgrading to the latest v3.81.0 is strongly recommended as it includes additional security hardening and dependency updates:
npm install payload@latest
pnpm add payload@latest
yarn add payload@latest
After upgrading, verify the installed version:
npm list payload
Step 3: Understand CVE-2026-34751 — Password Reset Hijack (CVSS 9.1)
This critical flaw exists in Payload’s forgot-password flow. The vulnerability stems from unvalidated user input in the password recovery endpoints — specifically in how the system constructs reset URLs. An unauthenticated attacker could manipulate the reset request to perform actions on behalf of any user who initiates a password reset.
You are at risk if ALL of the following are true:
- Your project runs Payload version earlier than v3.79.1
- You have any auth-enabled collection (e.g., a ‘Users’ collection)
- You are using the built-in forgot-password functionality
The patch in v3.79.1+ introduces stricter input validation and hardens URL construction logic for reset links.
Step 4: Understand CVE-2026-34747 — SQL Injection (CVSS 8.5)
This high-severity SQL injection vulnerability affects Payload’s database query layer when using PostgreSQL or SQLite adapters. Unvalidated input could allow attackers to manipulate database queries. The fix was included in v3.79.1 with stricter input sanitization across all query endpoints.
Step 5: Audit Your Auth Collections
After upgrading, review all auth-enabled collections in your Payload config to ensure they follow security best practices:
import { buildConfig } from 'payload'
export default buildConfig({
collections: [
{
slug: 'users',
auth: {
tokenExpiration: 7200,
cookies: { secure: true, sameSite: 'Strict' },
maxLoginAttempts: 5,
lockTime: 600000,
},
fields: [],
},
],
})
Step 6: Harden Your Password Reset Configuration
Even after patching, apply these additional hardening measures to your auth configuration:
auth: {
forgotPassword: { expiration: 3600 },
}
Ensure your PAYLOAD_SECRET environment variable is a strong, randomly generated string of at least 32 characters:
openssl rand -base64 32
Step 7: Enable Field-Level Access Control
Payload v3.81.0 added field-level access control to internal auth fields. Leverage this to restrict sensitive fields:
fields: [
{
name: 'role',
type: 'select',
options: ['admin', 'editor', 'viewer'],
access: {
read: ({ req: { user } }) => user?.role === 'admin',
update: ({ req: { user } }) => user?.role === 'admin',
},
},
]
Step 8: Run a Dependency Security Audit
Payload v3.81.0 resolved several high-severity dependency vulnerabilities (file-type, ajv, jose packages). After upgrading, run a full audit:
npm audit
pnpm audit
Address any remaining high or critical severity findings before deploying to production.
Step 9: Monitor for Future Security Advisories
Stay ahead of future vulnerabilities by:
- Watching the Payload CMS GitHub Releases page for security patches
- Subscribing to the Payload official release notes
- Setting up automated dependency update tools like Dependabot or Renovate
- Enabling GitHub security alerts on your repository
Step 10: Test Your Patched Installation
After upgrading and hardening, verify your installation is secure:
- Test the forgot-password flow end-to-end in a staging environment
- Verify that reset tokens expire correctly
- Confirm that auth-protected routes reject unauthenticated requests
- Run your full test suite to catch any breaking changes from the upgrade
Key Takeaway: Both CVE-2026-34751 and CVE-2026-34747 are serious vulnerabilities that require immediate action. Upgrading to Payload CMS v3.79.1 or later (ideally v3.81.0) is the primary remediation. Pair the upgrade with the hardening steps above to significantly reduce your attack surface.
Hashtags: #PayloadCMS #WebSecurity #CVE #NextJS #TypeScript #CyberSecurity #WebDevelopment #HeadlessCMS #SecurityPatch
Resources: