/

CVE-2026-127283

Severity:

HIGH RISK

(7.3)

Unrestricted Upload (CWE-434) in Food Ordering System

CVE-2026-127283

Deferred

Vulnerability type

Category:

Unrestricted File Upload

CWE:

CWE-284, CWE-434

Impact:

Unauthorized File Upload

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

SourceCodester Food Ordering System 1.0 has an unrestricted file upload vulnerability in the Admin Image Handler at admin/update_food.php, involving manipulation of the cmd argument. A remote attacker may be able to upload files the application does not adequately restrict; the resulting risk depends on access controls and how the server handles uploaded files.

Affected context

The issue is reported in the Admin Image Handler functionality of admin/update_food.php in SourceCodester Food Ordering System 1.0. It may be present where the handler accepts the cmd argument without sufficiently restricting the type or handling of uploaded files. The description confirms remote reachability but does not establish whether authentication is required.

Exploit preconditions

  • Attack surface: The remotely reachable admin/update_food.php endpoint
  • Required access: The required authentication or authorization level is not specified in the available description
  • Trigger point: Processing of the cmd argument by the Admin Image Handler
  • Why exploitation is possible: The handler may accept uploaded files without adequate restrictions on their type or use

Why this happens

The underlying issue is an insufficient restriction on uploaded files, mapping to CWE-434: Unrestricted Upload of File with Dangerous Type. Insecure upload handling can allow files beyond the intended image types or uses to be accepted, particularly when validation relies on user-controlled names or metadata rather than verifying content and enforcing safe storage and serving rules.

Potential impact

  • An attacker may upload unexpected or dangerous file types
  • Uploaded content could be served to users or processed in an unsafe way
  • If uploaded files are executable in the server environment, the issue could contribute to server-side compromise
  • Uploaded content may be used to deface pages or distribute malicious material

General mitigation guidance

Common defensive patterns focus on limiting what the upload handler accepts and how uploaded files are stored and served:

  • Allow only necessary file types and verify content using trusted inspection methods, not filename extensions alone
  • Use safe, generated storage names and store uploads outside executable or publicly writable locations where feasible
  • Apply authorization checks appropriate to the upload operation
  • Configure serving and processing paths so uploaded content cannot be interpreted as executable code
  • Enforce size limits and other upload constraints, and reduce the privileges of the application process

How teams detect issues like this

High-level review and monitoring can focus on:

  • Static analysis and code review for upload handlers that trust user-controlled arguments, filenames, or MIME types
  • Checks that validation is performed before storage and that uploaded files are stored and served safely
  • Policy enforcement requiring explicit allowlists, authorization checks, and safe storage for file uploads
  • Monitoring upload endpoint activity for unexpected file types, anomalous requests, or unusual access to uploaded content

Sources

SourceLink
github.comgithub.com/yuechuya/sourcecodester-vuln-reports/blob/main/reports/Food-Ordering-System/VULN-F1-Unauth-File-Upload-RCE.md
vuldb.comvuldb.com/cve/CVE-2026-127283
vuldb.comvuldb.com/submit/1041048
vuldb.comvuldb.com/vuln/436449
vuldb.comvuldb.com/vuln/436449/cti
sourcecodester.comsourcecodester.com/

Frequently asked

questions

The issue is described as remotely reachable through admin/update_food.php. Whether a remote attacker can exploit it depends on endpoint access controls and the deployment.

The available description does not specify authentication requirements. Review the endpoint's authorization controls to determine who can reach the upload functionality.

Restrict uploads to necessary file types, validate content, store files in a non-executable location, and ensure they are served safely.

Use a consistent upload policy with explicit type and size limits, authorization checks, safe storage practices, and code review or automated checks for upload handling.

Find out what's already
exploitable in your codebase.