Overview
Successful responses from the configured runtime endpoint on /media/, /static/, /errors/ and /var/ must not expose recognizable directory-index markup. Scope is these paths at scan time; transport or unsupported responses are inconclusive.
Why it Matters
Public folders should never allow automatic directory listing. If directory browsing is enabled, visitors can see every file name and structure inside those folders. Even if the files look harmless, attackers often use this information to plan attacks, find hidden scripts, or download sensitive files.
Disabling directory listing makes the system less transparent to attackers. It reduces information leaks and forces an attacker to work harder instead of simply browsing your files like a public index.
Verification Steps
Manual Verification
- Request /media/, /static/, /errors/ and /var/ on the assessed endpoint.
- Review status, redirects and returned markup for an index page.
- A transport failure or unsupported response is inconclusive; retain no sensitive response data in a public report.
Command / Review Sample
curl --max-time 10 -i https://store.example/media/
curl --max-time 10 -i https://store.example/static/
curl --max-time 10 -i https://store.example/errors/
curl --max-time 10 -i https://store.example/var/
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
- Investigate and change: Locate the virtual host or location serving each reported directory. Disable autoindex in nginx or Indexes in Apache for that location, including inherited configuration and CDN behavior.
- Validate the change: Request each observed directory again without credentials and verify no file listing is returned; a generic 200 page is not by itself proof of exposure.
- Recheck MB-0005: Repeat the same read-only request from the scanner after deployment and compare the effective response, including redirects and edge caches. Test the affected storefront, Admin or checkout behavior in staging before rollout.
Examples
Illustrative examples only. Interpret them within the current revision criterion above; missing collection evidence is unresolved, never PASS.
Fail Example
HTTP/1.1 200 OK
[response contains a recognizable Index of /media/ listing]
Pass Example
HTTP/1.1 403 Forbidden
[no directory-index markup]
# Repeat and interpret all four named paths.
Scope and Evidence Limits
Rule revision: 3. Target modes: LOCAL, REMOTE.
Successful responses from the configured runtime endpoint on /media/, /static/, /errors/ and /var/ must not expose recognizable directory-index markup. Scope is these paths at scan time; transport or unsupported responses are inconclusive.
Successful responses from the configured runtime endpoint on /media/, /static/, /errors/ and /var/ must not expose recognizable directory-index markup. Scope is these paths at scan time; transport or unsupported responses are inconclusive.
Catalog coverage describes implementation capability, not a scan outcome. An incomplete manual review cannot establish that the criterion is satisfied.