Severity:

HIGH RISK

(7.3)

Code Injection in MaxSite CMS MarkItUp Preview AJAX Endpoint

CVE-2026-3395

Analyzed

Vulnerability type

Category:

Code Injection

CWE:

CWE-74, CWE-94

Impact:

Remote Code Execution on the web server via a CMS plugin endpoint

Severity:

HIGH RISK

(7.3)

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

MaxSite CMS versions up to 109.1 contain a code injection vulnerability in the MarkItUp preview AJAX endpoint, where user-controlled data is passed into an eval-like function.

An attacker who can reach this endpoint over the network may inject and execute arbitrary code on the server, turning a simple content preview feature into a remote code execution vector.

Affected context

The vulnerability resides in application/maxsite/admin/plugins/editor_markitup/preview-ajax.php, which processes preview requests for the MarkItUp editor in MaxSite CMS.

It manifests when the endpoint evaluates request data directly, without adequate neutralization or restriction of the content being executed.

Installations that expose this AJAX endpoint over the network, especially in admin or editor workflows, are susceptible when untrusted or partially trusted input can reach the vulnerable function.

Exploit preconditions

  • Attack surface: HTTP(S) requests targeting the MarkItUp preview AJAX endpoint in MaxSite CMS.
  • Required access: Ability to send requests to the preview-ajax endpoint (often through an authenticated editing interface; exposure depends on the site's access controls and configuration).
  • Trigger point: Submission of crafted content or parameters that are passed into the eval function in preview-ajax.php.
  • Why exploitation is possible: The endpoint uses an evaluation mechanism on request data without robust sanitization, encoding, or restriction, enabling injected code or expressions to be executed on the server.

Why this happens

This issue stems from using an eval-like function in PHP to process dynamic content in the MarkItUp preview endpoint.

Instead of treating user input as inert data (e.g., text to be formatted or rendered), the implementation implicitly trusts the data and evaluates it as executable code or code-fragment, mapping to CWE-94: Improper Control of Generation of Code.

Additionally, the vulnerability involves insufficient neutralization of input before it is included in a dynamically constructed command or expression, aligning with CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component.

The fundamental insecure pattern is blending user-controlled data with executable context, allowing attackers to cross the boundary between data processing and code execution.

Potential impact

  • Execution of arbitrary PHP code in the context of the web server.
  • Complete compromise of the affected CMS instance and its data.
  • Access to database credentials and modification or exfiltration of content.
  • Lateral movement within the hosting environment, potentially impacting other sites on the same server.
  • Installation of backdoors or web shells, enabling persistent unauthorized access.

General mitigation guidance

Effective mitigation focuses on removing the dependency on eval-like semantics and confining user input to data-only processing paths:

  • Replace any use of eval or equivalent dynamic execution constructs with safer alternatives such as explicit parsing, whitelisting-based dispatch, or template rendering engines that treat input as data.
  • Strictly validate and normalize all parameters reaching the preview endpoint, ensuring only expected types, lengths, and formats are accepted.
  • Use robust encoding and templating mechanisms when inserting user content into server-side processing pipelines, avoiding direct interpolation into code or expressions.
  • Apply least-privilege principles to the CMS runtime: restrict file system permissions, database privileges, and the ability of the web server user to modify system files.
  • Limit exposure of editor and preview endpoints to authenticated and authorized users only, and consider additional controls such as CSRF protection and rate limiting to reduce attack surface.

How teams detect issues like this

Organizations can identify and monitor this class of vulnerability through several high-level approaches:

  • Static analysis: Configure rules to flag occurrences of eval, create_function, dynamic include/require, or similar dynamic execution constructs, especially when concatenated with request variables ($_GET, $_POST, $_REQUEST).
  • Code review: During manual reviews, focus on preview, rendering, and plugin endpoints that transform user text; verify that user input is never directly executed or interpreted as code.
  • Security testing: Incorporate dynamic application security testing (DAST) and fuzzing against AJAX and admin endpoints, looking for signs of code execution such as unexpected output, errors, or behavior changes when special characters and payload markers are supplied.
  • Operational monitoring: Deploy web server and application logging with attention to anomalies in preview-related requests and responses; correlate unusual requests to file changes, new processes, or outbound connections from the web server.

Sources

SourceLink
github.comgithub.com/maxsite/cms/
github.comgithub.com/maxsite/cms/commit/08937a3c5d672a242d68f53e9fccf8a748820ef3
vuldb.comvuldb.com/?ctiid.348281
vuldb.comvuldb.com/?id.348281
vuldb.comvuldb.com/?submit.762169

Frequently asked

questions

Yes. The vulnerable MarkItUp preview AJAX endpoint is reachable over HTTP(S), so any attacker who can send requests to it can attempt exploitation, subject to authentication and access controls in front of the editor interface.

Typically, the attacker must have at least enough access to interact with the editor or preview functionality (e.g., an authenticated user with content editing rights). In misconfigured environments where the endpoint is more broadly exposed, even unauthenticated users might be able to trigger it.

Remove or refactor any use of eval-like constructs in the preview endpoint so that user input is processed strictly as data. Implement strict validation and encoding of all parameters before use, and rely on templating or rendering libraries that do not execute arbitrary code.

Adopt coding standards that prohibit eval and dynamic code generation on user-controlled data, enforce these rules via static analysis and code review, and design plugin APIs so that extensions operate on sanitized data rather than constructing or executing code at runtime.

Find out what's already
exploitable in your codebase.