← Back to Baseline

MB-0800

Automated Upload inventory has no configured PHP or handler signatures

MB-C01 File & Folder Permissions Medium

Within the complete bounded configured upload path inventory, readable files contain no explicit long PHP opening tags or configured htaccess script-handler signatures and no PHP-like executable filename extension. Missing/unreadable/oversized eligible files, unfollowed links and traversal-budget gaps remain UNKNOWN. This is a signature policy, not absence of arbitrary executable content or prevention of server execution.

Overview

Within the complete bounded configured upload path inventory, readable files contain no explicit long PHP opening tags or configured htaccess script-handler signatures and no PHP-like executable filename extension. Missing/unreadable/oversized eligible files, unfollowed links and traversal-budget gaps remain UNKNOWN. This is a signature policy, not absence of arbitrary executable content or prevention of server execution.

Why it Matters

Upload content and local handler files can carry execution signatures that filenames alone miss. Inspecting both gives a concrete bounded hygiene check.

Signature absence is not proof against arbitrary executable content; unreadable or omitted files prevent a clean scoped result.

Verification Steps

Manual Verification

  1. Inventory all configured upload paths, readable contents and size/traversal limits.
  2. Inspect long PHP opening tags, configured htaccess handler signatures and PHP-like names without executing files.
  3. Treat linked, unreadable or oversized eligible files as unresolved.

Command / Review Sample

find pub/media -type f -print
# Inspect suspect content through approved protected review, not by executing it.
# Reconcile every eligible object with size/readability/traversal limits.

Use the assessed Magento project and the appropriate application or read-only review account. Replace example hosts, paths and identifiers with the assessment scope; configuration and source fragments are illustrative.

Remediation / Fix Guidance

  1. Quarantine the reported upload object outside the served tree for investigation; do not execute it. Determine how the PHP tag, PHP-like filename or script-handler override entered the upload path. Fix the real upload pipeline using server-derived type/extension policy, generated names, size limits and authorization; configure the delivery server so media cannot execute scripts.
  2. Test harmless accepted and rejected upload fixtures in isolation, verify no unintended handler overrides, and rerun the complete configured upload inventory. Resolve symlinks, unreadable or oversized eligible files before interpreting a clean result.
  3. Rerun MB-0800 against the same release, profile and relevant file/key/package scope; compare the new evidence and inspect any independent collection gaps.

Examples

Illustrative examples only. Interpret them within the current revision criterion above; missing collection evidence is unresolved, never PASS.

Fail Example

An eligible upload contains a configured PHP opening tag, handler signature or executable filename pattern.

Pass Example

Complete bounded collection has no configured signatures/names; server execution policy remains separately assessed.

Scope and Evidence Limits

Rule revision: 1. Target modes: LOCAL.

Within the complete bounded configured upload path inventory, readable files contain no explicit long PHP opening tags or configured htaccess script-handler signatures and no PHP-like executable filename extension. Missing/unreadable/oversized eligible files, unfollowed links and traversal-budget gaps remain UNKNOWN. This is a signature policy, not absence of arbitrary executable content or prevention of server execution.

Default pub/media inventory is applicable without demanding absent optional import/export paths; explicitly add relevant roots. Payload bytes and response bodies are never emitted; path/line/signature label only. XML opening tags are not treated as PHP. Original historical criterion and ID remain in the engineering backlog; this new ID records only its exact supported observation.

Catalog coverage describes implementation capability, not a scan outcome. An incomplete manual review cannot establish that the criterion is satisfied.

References