Loading module...
Loading module...
OWASP-02
Security misconfiguration is the most commonly seen issue, often resulting from insecure default configurations.
Security misconfiguration occurs when a system, application, or cloud service is set up incorrectly from a security perspective, creating vulnerabilities.
Impact: 100% of applications tested were found to have some form of misconfiguration, with over 719,000 CWE occurrences. Moving up from #5, this is now the second most critical risk.
Lack of appropriate security hardening across the application stack or improperly configured permissions on cloud services.
Unnecessary features, ports, services, pages, accounts, testing frameworks, or privileges left enabled or installed.
Default accounts and their passwords still enabled and unchanged, providing easy access to attackers.
Error handling that reveals stack traces or other overly informative error messages to users, exposing sensitive information.
For upgraded systems, the latest security features are disabled or not configured securely due to excessive prioritization of backward compatibility.
Security settings in application servers, frameworks (Struts, Spring, ASP.NET), libraries, and databases not set to secure values.
The server does not send security headers or directives, or they are not set to secure values. Important browser-enforced protections that are commonly missing:
X-Frame-Options: DENY (or equivalent Content-Security-Policy: frame-ancestors 'none'), an attacker can embed your page in an invisible iframe on their own site and trick a logged-in user into clicking something they didn't intend (for example, a hidden "transfer funds" button positioned under a fake "Play video" button).X-Content-Type-Options: nosniff, browsers may reinterpret a file's type based on its contents, turning an innocuous-looking upload into executable script.Strict-Transport-Security (HSTS), an active network attacker can strip HTTPS on the first visit and hold the user on HTTP.Content-Security-Policy), the browser has no declarative restriction on where scripts, styles, images, or frames may come from, which weakens the impact ceiling of an XSS or supply-chain injection.Improper restriction of XML External Entity (XXE) references. When an XML parser is configured to resolve external entities, an attacker who controls any XML input can make the server read local files, make outbound network requests (SSRF), or in some parsers execute code.
Vulnerable pattern (Java, DocumentBuilderFactory defaults):
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder(); // external entities enabled by default
Document doc = db.parse(userSuppliedXmlStream);Attacker submits XML containing:
<?xml version="1.0"?>
<!DOCTYPE foo [ <!ENTITY xxe SYSTEM "file:///etc/passwd"> ]>
<root>&xxe;</root>On parsing, the server resolves the entity and returns the contents of /etc/passwd inside whatever response exposes the parsed node.
Mitigation: disable DTD processing and external entity resolution explicitly on every XML parser. In Java:
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
dbf.setFeature("http://xml.org/sax/features/external-general-entities", false);
dbf.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
dbf.setXIncludeAware(false);Prefer parsers and formats that don't support external entities at all (e.g., JSON) where feasible.
XXE is cross-listed under A05 Injection because the attack mechanism is injection-shaped. Untrusted XML input drives the parser to take unintended action. OWASP 2025 catalogs the root cause (a misconfigured XML parser with entity resolution left on) under Security Misconfiguration, so the primary treatment lives here.
The application server comes with sample applications not removed from production. These samples have known security flaws.
Attack: An attacker discovers the admin console is still accessible. Default accounts weren't changed, so the attacker logs in with default credentials and takes over the server.
Impact: Complete server compromise.
Directory listing is not disabled on the server.
Attack: An attacker discovers they can list directories, finds and downloads compiled Java classes, decompiles them, and reverse engineers the code. They discover a severe access control flaw.
Impact: Source code exposure and discovery of critical vulnerabilities.
The application server's configuration allows detailed error messages with stack traces to be returned to users.
Attack: An attacker triggers errors to expose sensitive information, component versions, and underlying flaws that are known to be vulnerable.
Impact: Information disclosure leading to targeted attacks.
A cloud service provider defaults to having sharing permissions open to the Internet.
Attack: An attacker discovers publicly accessible S3 buckets containing sensitive customer data, API keys, or internal documents.
Impact: Massive data breach, credential exposure.
Implement a repeatable hardening process enabling fast and easy deployment of properly locked down environments:
Provide effective and secure separation between components or tenants using:
Send security directives to clients, including:
Implement an automated process to verify the effectiveness of configurations and settings in all environments.
Proactively add central configuration to intercept excessive error messages as a backup.
Content adapted from OWASP Top 10:2025, licensed under CC BY-SA 4.0