/

CVE-2026-35047

Severity:

CRITICAL RISK

(9.8)

Unrestricted File Upload in Brave CMS CKEditor Endpoint

CVE-2026-35047

Analyzed

Vulnerability type

Category:

Unrestricted File Upload

CWE:

CWE-434

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.8)

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

An unrestricted file upload vulnerability in Brave CMS's CKEditor endpoint allows attackers to upload arbitrary files, including executable scripts, to the server.

When exposed, this behavior can be abused to achieve remote code execution, enabling full system compromise, data theft, or disruption of the CMS and hosted sites.

Affected context

The vulnerability occurs in Brave CMS deployments that expose the CKEditor upload endpoint and accept user-supplied files without robust validation or restrictions.

It is most risky in environments where web-accessible upload directories are served by the same application runtime, and where uploaded content can be interpreted as executable code (e.g., scripts handled by the web server or language runtime).

Multi-tenant or contributor-heavy sites, content portals, and instances allowing untrusted or semi-trusted users to upload content are particularly exposed.

Exploit preconditions

  • Attack surface: HTTP(S) requests to the CKEditor upload endpoint within Brave CMS.
  • Required access: Ability to reach the upload endpoint, typically as an authenticated user with content-editing or upload privileges; in some configurations, potentially even unauthenticated access if the endpoint is not access-controlled.
  • Trigger point: Submission of a crafted upload request that includes a server-executable file (e.g., script or code file) rather than a benign media asset.
  • Why exploitation is possible: The endpoint fails to enforce strict controls on file type, content, and storage location, allowing attacker-controlled files to be stored in a web-accessible path where the server may execute or interpret them.

Why this happens

This issue stems from insufficient server-side validation and restriction of uploaded files, aligning with CWE-434: Unrestricted Upload of File with Dangerous Type.

Instead of strictly limiting uploads to known-safe file types (such as specific image formats) and verifying both file metadata and content, the CKEditor endpoint accepts arbitrary files and stores them in locations that the web server can execute or interpret.

The core insecure pattern is treating user-controlled file uploads as inherently safe content, failing to enforce whitelists, content inspection, safe storage locations, and non-executable permissions on uploaded data.

Potential impact

  • Remote execution of arbitrary code on the server via uploaded scripts or executables
  • Full compromise of the CMS instance, including administrative takeover
  • Access to or exfiltration of sensitive data stored on the server or connected databases
  • Modification or defacement of hosted content and websites
  • Use of the compromised server as a foothold for lateral movement within the network
  • Service disruption or denial of service by deploying malicious payloads that impact stability

General mitigation guidance

Effective mitigation focuses on strictly controlling upload behavior and isolating uploaded content from execution paths:

  • Enforce a positive (whitelist) file-type policy, allowing only necessary, low-risk formats (e.g., specific image MIME types) and rejecting all others.
  • Validate both MIME type and file extension server-side, and inspect file content signatures rather than trusting client-supplied headers.
  • Store uploaded files outside of web-executable directories, so the web server cannot interpret them as code, and apply non-executable filesystem permissions.
  • Normalize and sanitize file names, removing or replacing unsafe characters and preventing path traversal or double-extension tricks.
  • Apply least privilege to the process and directories handling uploads, limiting what a compromised upload path can affect.
  • Introduce centralized upload handling components or middleware that enforce consistent validation and storage policies across the application.

How teams detect issues like this

Detection generally involves a combination of code analysis, configuration review, and runtime monitoring:

  • Static analysis and code review: Look for upload handlers that:
  • Accept arbitrary file extensions or MIME types
  • Write user-supplied files into webroot or executable directories
  • Lack server-side validation of file content and type
  • Security testing / DAST: Use automated scanners or manual tests to upload non-image or clearly executable files and observe if they are accepted and accessible via the web server.
  • Logging and monitoring: Enable detailed logs around upload endpoints, including file names, types, and storage paths; monitor for suspicious patterns (e.g., uploads with script extensions).
  • Configuration audits: Review web server and application configuration to identify directories where execution is enabled and cross-check these with upload storage locations.
  • Policy enforcement in CI/CD: Integrate automated code review tools and security linters to flag new or modified upload handlers that do not follow approved validation and storage patterns.

Sources

SourceLink
github.comgithub.com/Ajax30/BraveCMS-2.0/commit/058ee4ed7c2b39d540af8274024afcbc9532aa83
github.comgithub.com/Ajax30/BraveCMS-2.0/pull/122
github.comgithub.com/Ajax30/BraveCMS-2.0/security/advisories/GHSA-9rcc-w59j-965v

Frequently asked

questions

Yes. An attacker who can reach the CKEditor upload endpoint and submit files can exploit this vulnerability remotely over HTTP(S), assuming they meet any authentication requirements in place.

Often, the attacker needs at least basic upload or content-editing permissions, but the actual requirement depends on how the CKEditor endpoint is exposed. If misconfigured, it might be reachable without authentication, significantly lowering the attack bar.

The most robust fix pattern is to strictly restrict allowed file types to a minimal set of safe formats, validate files server-side, and store uploads outside of executable web directories under non-executable permissions. Centralizing upload handling and validation logic also reduces the likelihood of bypasses.

Adopt a standard upload security policy across the application: enforce file-type whitelisting, perform content-based validation, use non-executable storage locations, and ensure uploads are never directly executable. Incorporate these rules into code review checklists, automated tests, and security tooling so new upload features must comply by default.

Find out what's already
exploitable in your codebase.