Default or Sample Content Present

Default pages, sample applications or documentation installed with the server or framework remain accessible on the production site.

SeverityLow
CVSS 3.13.7 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N Open in the calculator
CVSS 4.06.3 CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N Open in the calculator
CWECWE-1188: Initialization of a Resource with an Insecure Default
MITRE ATT&CKT1592.002 Software, T1190 Exploit Public-Facing Application
CategorySecurity Misconfiguration

Description

Content installed by default with a web server, application server, framework or content management system has been left on the production server. Examples include web server welcome and test pages, such as the default pages of Apache, IIS and nginx, the Apache HTTP Server manual, the Apache Tomcat examples and docs applications, sample scripts shipped with frameworks and products, installation and upgrade scripts, and readme, changelog and licence files.

Such content identifies the product and often its version, which helps an attacker target known vulnerabilities in it, and its presence can indicate wider gaps in the server's hardening. A default page served for an unrecognised host name can also reveal a forgotten or unmanaged virtual host.

Sample applications are written to demonstrate features rather than to be secure, and can themselves contain exploitable flaws, such as cross-site scripting or the disclosure of request, session and server details; some let visitors change data, such as the Tomcat examples that allow session attributes to be set. Installation scripts left in place may let a visitor run setup steps again. The direct impact is usually limited, but it rises where sample code or installation scripts allow changes to data or configuration.

Default content is found by content discovery, and is recognised by web scanners such as Nikto, which hold lists of known default files.

Remediation

Remove everything from production that the application does not need:

  • Delete default and sample content: web server welcome pages, the Apache manual and its configuration alias, the Tomcat examples and docs applications (and manager and host-manager where they are not used), framework samples, installation and upgrade scripts, and readme and changelog files.
  • Configure the default virtual host to return a neutral response, such as 404, for unrecognised host names, rather than a default page.
  • Build servers from a hardened baseline or image that excludes sample content, and include a check for known default files in the deployment process.

Confirm the fix by repeating content discovery and requesting the files previously found: each should return 404.

References


Add This Finding to Your Library

In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.

Free trial  ·  No card required

Only need the reporting? Our reporting tool is free and open source, with the same library.


More Web Applications Findings

Every Web Applications finding