Severity:

CRITICAL RISK

(9.8)

Unrestricted File Upload in WebStack WordPress Theme

CVE-2026-1555

Deferred

Vulnerability type

Category:

Unrestricted File Upload

CWE:

CWE-434

Impact:

Potential Remote Code Execution via Arbitrary File Upload

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

The WebStack WordPress theme contains an unrestricted file upload vulnerability in the io_img_upload() function that fails to validate file types before saving them to the server.

Unauthenticated attackers can upload arbitrary files, which can potentially be executed by the web server and lead to full remote code execution under certain configurations.

Affected context

This vulnerability occurs in WordPress sites using the WebStack theme (up to and including version 1.2024) where the io_img_upload() handler is exposed to unauthenticated users.

The theme's upload functionality accepts files intended as images but does not reliably enforce file type restrictions or verify content before storage.

Where uploaded files are placed in web-accessible directories and executable file types are allowed by the environment, those files may later be invoked directly via HTTP requests.

Exploit preconditions

  • Attack surface: Publicly reachable WordPress site using the WebStack theme.
  • Required access: No authentication is required; the vulnerable upload endpoint is accessible to anonymous users.
  • Trigger point: Sending a crafted HTTP request to the io_img_upload() functionality with a malicious file disguised as a legitimate upload.
  • Why exploitation is possible: The upload logic omits robust file type and content validation, allowing arbitrary files to be stored in locations that may be interpreted or executed by the server.

Why this happens

The underlying bug class maps to CWE-434: Unrestricted Upload of File with Dangerous Type.

The io_img_upload() function is expected to handle image uploads but does not strictly validate the file extension, MIME type, or file contents against an allowlist of safe formats, nor does it enforce storage in non-executable locations.

As a result, the application treats attacker-supplied files as trusted content, permitting them to be written to the filesystem without ensuring they cannot be executed or interpreted as code.

Potential impact

  • Upload and storage of arbitrary files on the web server.
  • Remote code execution if the environment executes uploaded scripts (e.g., PHP or other server-side code).
  • Website defacement by serving malicious content from uploaded files.
  • Use of the server as a platform for malware hosting or phishing pages.
  • Lateral movement or further compromise of the underlying host if the web server account has excessive privileges.

General mitigation guidance

Effective mitigation focuses on constraining what can be uploaded and how those files are handled by the server.

Recommended defensive patterns include:

  • Implement strict allowlist-based file type validation, checking both file extension and server-side verified MIME type.
  • Perform content-level inspection where feasible (e.g., validating image headers) rather than relying only on client-supplied metadata.
  • Store all uploaded files in non-executable directories and ensure the web server is configured not to execute scripts from upload locations.
  • Normalize and sanitize file names and paths, avoiding user-controlled directory or extension components.
  • Enforce least privilege for the web server process and file-system permissions to limit damage if malicious files are present.
  • Prefer using well-vetted framework or CMS upload APIs that provide secure defaults over custom upload handlers.

How teams detect issues like this

Organizations can detect and monitor for unrestricted file upload issues through several approaches:

  • Static analysis: Flag custom upload handlers that:
  • Accept files without extension/MIME allowlists.
  • Write user-provided files to web-root or executable paths.
  • Lack server-side checks on uploaded content.
  • Code review: Look for:
  • Direct use of $_FILES (or equivalent) with minimal validation.
  • Absence of checks for allowed extensions, MIME types, and maximum size.
  • File writes into directories configured for script execution.
  • Runtime monitoring and logging:
  • Track file uploads, including file names, paths, and types, and alert on suspicious or executable extensions.
  • Monitor HTTP access logs for requests to newly uploaded paths or unusual directories.
  • Security testing: Incorporate upload abuse scenarios in regular penetration tests and automated DAST tools to verify that only safe file types can be stored and accessed.

Sources

SourceLink
github.comgithub.com/owen0o0/WebStack/blob/master/inc/ajax.php#L5
github.comgithub.com/owen0o0/WebStack/tree/master
wordfence.comwordfence.com/threat-intel/vulnerabilities/id/b97805de-1b47-4c9f-baae-2e37c1b78570?source=cve

Frequently asked

questions

Yes. Because the upload endpoint is accessible without authentication, a remote attacker can exploit it over the internet if the site is publicly reachable.

No. The issue affects the unauthenticated io_img_upload() functionality, so no login is required to attempt arbitrary file uploads.

The most robust fix is to enforce strict server-side validation using an allowlist of permitted file types, store uploads in non-executable locations, and rely on hardened upload APIs rather than custom file-handling logic.

Adopt a standard secure upload pattern: treat all uploaded files as untrusted, validate type and content defensively, isolate uploads from executable paths, and include upload handlers in routine security reviews and automated scanning policies.

Find out what's already
exploitable in your codebase.