/

CVE-2026-105857

Severity:

CRITICAL RISK

(10.0)

Code Injection (CWE-94) in Payload CMS Form Builder

CVE-2026-105857

Analyzed

Vulnerability type

Category:

Code Injection

CWE:

CWE-94, CWE-1321

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(10.0)

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

A critical code injection vulnerability in the Payload CMS form builder plugin allows a specially crafted form submission to execute code on the server.

The issue becomes risky when externally supplied form data reaches server-side processing paths that evaluate or execute attacker-controlled content.

A critical code injection vulnerability in the Payload CMS form builder plugin allows a specially crafted form submission to execute code on the server.

The issue becomes risky when externally supplied form data reaches server-side processing paths that evaluate or execute attacker-controlled content.

Affected context

The vulnerability occurs in Payload CMS deployments using the form-builder plugin versions affected by this issue. Exploitation depends on a form submission being accepted by the application and processed through a vulnerable server-side execution path without sufficiently restricting the submitted content.

The vulnerability occurs in Payload CMS deployments using the form-builder plugin versions affected by this issue. Exploitation depends on a form submission being accepted by the application and processed through a vulnerable server-side execution path without sufficiently restricting the submitted content.

Exploit preconditions

  • Attack surface: Publicly or internally reachable form submission functionality
  • Required access: Ability to submit data to an affected form; authentication may not be required depending on form configuration
  • Trigger point: Server-side handling of a crafted form submission
  • Why exploitation is possible: Attacker-controlled input can reach code-generation or execution behavior without adequate separation between data and executable instructions
  • Attack surface: Publicly or internally reachable form submission functionality
  • Required access: Ability to submit data to an affected form; authentication may not be required depending on form configuration
  • Trigger point: Server-side handling of a crafted form submission
  • Why exploitation is possible: Attacker-controlled input can reach code-generation or execution behavior without adequate separation between data and executable instructions

Why this happens

The underlying flaw is improper neutralization of user-controlled input in a context that can interpret it as executable code. This maps to CWE-94: Improper Control of Generation of Code ('Code Injection').

The associated CWE-1321 classification can also apply when attacker-controlled values influence dynamic object or property behavior in a way that contributes to unsafe execution. The insecure pattern is trusting form data beyond its intended data model and allowing it to affect server-side execution semantics.

The underlying flaw is improper neutralization of user-controlled input in a context that can interpret it as executable code. This maps to CWE-94: Improper Control of Generation of Code ('Code Injection').

The associated CWE-1321 classification can also apply when attacker-controlled values influence dynamic object or property behavior in a way that contributes to unsafe execution. The insecure pattern is trusting form data beyond its intended data model and allowing it to affect server-side execution semantics.

Potential impact

  • An attacker may execute arbitrary code with the privileges of the application process
  • The attacker could access, alter, or delete application and content-management data
  • Server credentials, environment variables, or stored secrets may be exposed
  • The application could be used to compromise connected services or internal systems
  • Content integrity, availability, and tenant isolation may be affected
  • An attacker may execute arbitrary code with the privileges of the application process
  • The attacker could access, alter, or delete application and content-management data
  • Server credentials, environment variables, or stored secrets may be exposed
  • The application could be used to compromise connected services or internal systems
  • Content integrity, availability, and tenant isolation may be affected

General mitigation guidance

Mitigation generally focuses on ensuring that form submissions remain data and cannot influence executable behavior.

Common defensive patterns include:

  • Separating user-controlled values from code, templates, expressions, and command execution paths
  • Applying strict allowlist validation and schema enforcement to form fields
  • Using safe APIs that do not evaluate strings as code or dynamically resolve arbitrary properties
  • Restricting server-side process privileges, filesystem access, and network permissions
  • Limiting form submission capabilities and applying authentication or authorization where appropriate
  • Treating submitted content as untrusted across validation, transformation, storage, and rendering stages

Mitigation generally focuses on ensuring that form submissions remain data and cannot influence executable behavior.

Common defensive patterns include:

  • Separating user-controlled values from code, templates, expressions, and command execution paths
  • Applying strict allowlist validation and schema enforcement to form fields
  • Using safe APIs that do not evaluate strings as code or dynamically resolve arbitrary properties
  • Restricting server-side process privileges, filesystem access, and network permissions
  • Limiting form submission capabilities and applying authentication or authorization where appropriate
  • Treating submitted content as untrusted across validation, transformation, storage, and rendering stages

How teams detect issues like this

Detection approaches may include:

  • Static analysis for dynamic evaluation, command construction, unsafe template handling, and user-controlled property resolution
  • Code review of form-processing handlers and transformations that pass submission data into interpreters or execution APIs
  • Runtime monitoring for unexpected child processes, unusual outbound connections, or abnormal server-side execution during form handling
  • Policy enforcement requiring schemas and allowlists for externally submitted fields
  • Automated security review tools that flag data-flow paths from request parameters to code-execution sinks

Detection approaches may include:

  • Static analysis for dynamic evaluation, command construction, unsafe template handling, and user-controlled property resolution
  • Code review of form-processing handlers and transformations that pass submission data into interpreters or execution APIs
  • Runtime monitoring for unexpected child processes, unusual outbound connections, or abnormal server-side execution during form handling
  • Policy enforcement requiring schemas and allowlists for externally submitted fields
  • Automated security review tools that flag data-flow paths from request parameters to code-execution sinks

Sources

SourceLink
github.comgithub.com/payloadcms/payload/commit/333b82b9f3e685fed6826c2e3270da79df8336c6
github.comgithub.com/payloadcms/payload/releases/tag/v3.90.0
github.comgithub.com/payloadcms/payload/security/advisories/GHSA-r488-j9vj-wx3q

Frequently asked

questions

Yes, exploitation may be remote when an attacker can reach and submit data to a vulnerable form endpoint. The exact exposure depends on deployment routing, form access controls, and plugin configuration.

Not necessarily. Public forms may be exploitable without an account, while authenticated forms require access to the relevant submission endpoint.

Prevent submitted values from reaching code-execution or dynamic evaluation paths, enforce strict schemas and allowlists, and isolate the application with least-privilege permissions.

Treat all form data as untrusted, use non-evaluating APIs, review data flows into execution-sensitive functions, and enforce automated security checks throughout development.

Yes, exploitation may be remote when an attacker can reach and submit data to a vulnerable form endpoint. The exact exposure depends on deployment routing, form access controls, and plugin configuration.

Not necessarily. Public forms may be exploitable without an account, while authenticated forms require access to the relevant submission endpoint.

Prevent submitted values from reaching code-execution or dynamic evaluation paths, enforce strict schemas and allowlists, and isolate the application with least-privilege permissions.

Treat all form data as untrusted, use non-evaluating APIs, review data flows into execution-sensitive functions, and enforce automated security checks throughout development.

Find out what's already
exploitable in your codebase.