/

CVE-2026-38329

Severity:

CRITICAL RISK

(9.8)

Missing Auth Checks (CWE-862) in Bludit API Upload

CVE-2026-38329

Deferred

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-862

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

Bludit CMS suffers from a missing authorization check in its API file upload endpoint, allowing authenticated API clients to upload arbitrary files without proper validation.

Under these conditions, an attacker with a valid API token can upload a malicious PHP script and achieve remote code execution on the hosting server.

Affected context

This vulnerability appears in Bludit CMS deployments that enable and expose the API Plugin, specifically the POST /api/files/{key} endpoint in bl-plugins/api/plugin.php.

It becomes relevant when API tokens are issued to users or integrated systems and when the web server is configured to execute uploaded PHP files. The issue is exacerbated if file upload paths are web-accessible and there is no additional middleware enforcing authorization or file-type restrictions.

Exploit preconditions

  • Attack surface: HTTP(S) API interface exposed by the Bludit CMS API Plugin.
  • Required access: Possession of a valid API token, which may belong to a low-privileged or non-admin user.
  • Trigger point: Sending a POST /api/files/{key} request that uploads a PHP file, followed by an HTTP request to the uploaded file path.
  • Why exploitation is possible: The endpoint fails to enforce authorization checks on file upload operations and lacks file extension validation, allowing executable scripts to be stored in a web-exposed directory and interpreted by the server.

Why this happens

The core issue is a missing authorization control on a sensitive API operation, mapping directly to CWE-862: Missing Authorization.

The file upload endpoint treats any holder of an API token as implicitly trusted for uploading files, without checking whether the caller is authorized to perform such an action or restricting what file types can be uploaded. This insecure pattern allows general-purpose, potentially executable content to be stored where it can later be invoked, turning a design oversight in access control into a code execution path.

Potential impact

  • Remote execution of arbitrary PHP code within the web server's security context.
  • Complete compromise of the Bludit CMS instance, including content and configuration.
  • Lateral movement within the hosting environment, depending on server permissions.
  • Deployment of web shells or backdoors for persistent access.
  • Data theft, tampering, or destruction of site content and associated databases.

General mitigation guidance

Effective mitigation focuses on tightening authorization and reducing the power of file uploads by default.

Common defensive patterns include:

  • Enforcing fine-grained authorization on all file upload endpoints, ensuring only roles that truly require upload capabilities can access them.
  • Applying strict allowlists for file extensions and MIME types, and prohibiting executable types such as .php, .phtml, or other server-interpreted formats.
  • Storing uploaded files outside of web-executable directories, serving them as static content rather than executable scripts.
  • Applying least-privilege to the web server and application user so that, even if a file is uploaded, its ability to affect the broader system is constrained.
  • Centralizing and reusing authorization checks and policies across API handlers to avoid inconsistencies and omissions in future endpoints.

How teams detect issues like this

Organizations can identify this type of issue through both preventative and reactive measures:

  • Static analysis rules that flag endpoints performing file writes or uploads without adjacent authorization checks or policy evaluations.
  • Code review practices that treat any file upload or file system write as a high-risk operation requiring explicit access control and extension filtering.
  • Logging and monitoring of API file uploads, including file names, types, and calling identities, with alerts on suspicious patterns such as uploads of .php files.
  • Security testing and fuzzing of API endpoints to verify that actions are denied appropriately when authorization headers or tokens are missing, invalid, or low-privileged.

Sources

SourceLink
gist.github.comgist.github.com/Ki1ro0133/8bd14bd4fc6fab81c907d838a7aeee55

Frequently asked

questions

Yes. Any attacker who can reach the API endpoint and possesses a valid API token can exploit the vulnerability remotely over HTTP(S).

The attacker needs a valid API token, which could belong to a non-admin or low-privileged account. No additional administrative privileges are required if the endpoint does not enforce proper authorization.

Introduce strict authorization checks on the file upload endpoint, enforce role-based access control, and block upload of server-executable file types by design. Additionally, ensure uploaded content is stored in non-executable directories.

Adopt a security-by-design approach where all API endpoints, especially those involving file system operations, must explicitly declare and enforce required permissions. Combine this with centralized authorization middleware, strict file handling policies, and regular security reviews of new or changed endpoints.

Find out what's already
exploitable in your codebase.