/

CVE-2026-105858

Severity:

HIGH RISK

(8.1)

Code Injection (CWE-94) in Payload First Registration

CVE-2026-105858

Analyzed

Vulnerability type

Category:

Code Injection

CWE:

CWE-94, CWE-1321

Impact:

Remote Code Execution

Severity:

HIGH RISK

(8.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Payload contains a remote code execution vulnerability in its public first-register operation when local authentication is enabled and no initial user exists. A crafted request may cause attacker-controlled input to be executed as code before the application has completed its initial account setup.

Payload contains a remote code execution vulnerability in its public first-register operation when local authentication is enabled and no initial user exists. A crafted request may cause attacker-controlled input to be executed as code before the application has completed its initial account setup.

Affected context

The issue can occur in Payload deployments that use local authentication and expose the first-register operation while no initial user has been created. The risk depends on the registration endpoint remaining publicly reachable and on the affected code path processing crafted request data in an executable context.

The issue can occur in Payload deployments that use local authentication and expose the first-register operation while no initial user has been created. The risk depends on the registration endpoint remaining publicly reachable and on the affected code path processing crafted request data in an executable context.

Exploit preconditions

  • Attack surface: Public first-register operation
  • Required access: Ability to send requests to the exposed registration endpoint; prior authentication may not be required
  • Trigger point: Processing of a crafted first-registration request
  • Required application state: Local authentication is enabled and no initial user exists
  • Why exploitation is possible: Attacker-controlled input reaches a code-execution path before the initial registration workflow safely constrains or neutralizes it
  • Attack surface: Public first-register operation
  • Required access: Ability to send requests to the exposed registration endpoint; prior authentication may not be required
  • Trigger point: Processing of a crafted first-registration request
  • Required application state: Local authentication is enabled and no initial user exists
  • Why exploitation is possible: Attacker-controlled input reaches a code-execution path before the initial registration workflow safely constrains or neutralizes it

Why this happens

The underlying bug is an improper separation between user-controlled registration data and executable application behavior. When crafted input is interpreted in a code-bearing context rather than treated strictly as data, an attacker may influence program execution. This maps to CWE-94: Improper Control of Generation of Code, with CWE-1321 also indicating a related weakness involving unsafe manipulation or interpretation of application object properties.

The underlying bug is an improper separation between user-controlled registration data and executable application behavior. When crafted input is interpreted in a code-bearing context rather than treated strictly as data, an attacker may influence program execution. This maps to CWE-94: Improper Control of Generation of Code, with CWE-1321 also indicating a related weakness involving unsafe manipulation or interpretation of application object properties.

Potential impact

  • An attacker may execute arbitrary code in the Payload application process
  • The application environment could be compromised
  • Confidential content and stored credentials may be exposed
  • Attackers could modify content, accounts, or application configuration
  • The affected host or connected services may be used for further intrusion
  • An attacker may execute arbitrary code in the Payload application process
  • The application environment could be compromised
  • Confidential content and stored credentials may be exposed
  • Attackers could modify content, accounts, or application configuration
  • The affected host or connected services may be used for further intrusion

General mitigation guidance

Mitigation generally focuses on removing executable interpretation from registration inputs and reducing exposure of bootstrap workflows.

Common defensive patterns include:

  • Treating all registration fields as data and applying strict allowlisted schemas
  • Separating dynamic values from code-generation or evaluation mechanisms
  • Ensuring bootstrap endpoints are disabled, restricted, or single-use after initialization
  • Requiring an administrative trust boundary before account creation where practical
  • Applying least-privilege permissions to the application process and its connected services
  • Using secure-by-default authentication configuration and monitoring unexpected registration activity

Mitigation generally focuses on removing executable interpretation from registration inputs and reducing exposure of bootstrap workflows.

Common defensive patterns include:

  • Treating all registration fields as data and applying strict allowlisted schemas
  • Separating dynamic values from code-generation or evaluation mechanisms
  • Ensuring bootstrap endpoints are disabled, restricted, or single-use after initialization
  • Requiring an administrative trust boundary before account creation where practical
  • Applying least-privilege permissions to the application process and its connected services
  • Using secure-by-default authentication configuration and monitoring unexpected registration activity

How teams detect issues like this

Organizations can assess this class of issue through:

  • Static analysis for dynamic evaluation, runtime code generation, or unsafe interpretation of request fields
  • Code review of first-run, registration, and bootstrap authentication paths
  • Tests that submit unexpected types and values to registration inputs and verify that they remain inert data
  • Policy enforcement requiring authentication or network restrictions for administrative bootstrap operations
  • Runtime monitoring for unusual first-register requests, process-spawning behavior, and unexpected outbound activity

Automated code-review and application-security tools may help identify unsafe execution patterns, but findings should be validated against the deployment's initialization state.

Organizations can assess this class of issue through:

  • Static analysis for dynamic evaluation, runtime code generation, or unsafe interpretation of request fields
  • Code review of first-run, registration, and bootstrap authentication paths
  • Tests that submit unexpected types and values to registration inputs and verify that they remain inert data
  • Policy enforcement requiring authentication or network restrictions for administrative bootstrap operations
  • Runtime monitoring for unusual first-register requests, process-spawning behavior, and unexpected outbound activity

Automated code-review and application-security tools may help identify unsafe execution patterns, but findings should be validated against the deployment's initialization state.

Sources

SourceLink
github.comgithub.com/payloadcms/payload/commit/e947fc4ba4a434f276d043386e501b1d14eda679
github.comgithub.com/payloadcms/payload/releases/tag/v3.90.0
github.comgithub.com/payloadcms/payload/security/advisories/GHSA-97rh-rhh2-7vjv

Frequently asked

questions

It may be remotely exploitable when the public first-register operation is reachable and the required initial authentication state remains active. Exploitability depends on deployment configuration and endpoint exposure.

Not necessarily. The affected operation is intended for initial registration, so an attacker may only need network access to the endpoint while local authentication is enabled and no initial user exists.

Use a corrected release, eliminate any path that interprets registration input as executable code, and restrict or disable public bootstrap registration after initialization.

Enforce strict input schemas, keep user-controlled data separate from executable logic, review bootstrap workflows for unauthenticated exposure, and apply least privilege to the application and its services.

It may be remotely exploitable when the public first-register operation is reachable and the required initial authentication state remains active. Exploitability depends on deployment configuration and endpoint exposure.

Not necessarily. The affected operation is intended for initial registration, so an attacker may only need network access to the endpoint while local authentication is enabled and no initial user exists.

Use a corrected release, eliminate any path that interprets registration input as executable code, and restrict or disable public bootstrap registration after initialization.

Enforce strict input schemas, keep user-controlled data separate from executable logic, review bootstrap workflows for unauthenticated exposure, and apply least privilege to the application and its services.

Find out what's already
exploitable in your codebase.