CWE-204: Observable Response Discrepancy

What is CWE-204?

CWE-204 is Observable Response Discrepancy. The flaw arises when the product returns different responses to incoming requests in a way that reveals internal state information to an unauthorized actor outside the intended control sphere. The database currently holds 70 vulnerabilities mapped to CWE-204 and none of them are in the CISA Known Exploited Vulnerabilities catalog.

OWASP Top 10 Rank-
Related CVES (365 days)70
AbstractionBase
Likelihood of exploit-

Vulnerabilities mapped to CWE-204

70 vulnerabilities289% increase year over year

No data

No vulnerability data in CISA KEV for CWE-204

Official definition

ByMitre CWE

The product provides different responses to incoming requests in a way that reveals internal state information to an unauthorized actor outside of the intended control sphere.

Detailed description

When similar inputs produce observably different responses, an external actor can use the discrepancy to infer information that should not be available to them. For example, different failed-login messages can reveal whether a username is valid. This disclosure can help an attacker refine subsequent attacks, and may result from either an inadvertent implementation defect or an intentional but unsafe design choice.

Characteristics

This weakness occurs when similar requests produce distinguishable responses, such as different error messages, response content, or packet properties. The discrepancy can reveal internal state, including whether a username, account, file, directory, or network port exists. It frequently arises in authentication and error handling during architecture, design, or implementation, and is not specific to a programming language.

Common consequences

The primary potential impacts are confidentiality and access control. An attacker may read or infer application data, such as valid usernames or the existence of resources, and may bypass protection mechanisms by using that information to improve enumeration, password-guessing, or other attacks.

ImpactScopeExplanation
Read Application Data, Bypass Protection MechanismConfidentiality, Access Control-

Risk mitigations

Architecture and design: Compartmentalize the system so that trust boundaries are unambiguous, sensitive data remains within the appropriate boundary, and privilege separation is reinforced through least privilege. Implementation: Keep error messages to the minimum detail needed by the intended audience, avoid revealing how an error was determined, and avoid inconsistent messages that disclose internal state such as whether an account exists. If detailed errors must be captured, place them in logs while considering whether attackers could access those logs, and never log highly sensitive information such as passwords.

  1. Separation of Privilege · Architecture and DesignCompartmentalize the system to have "safe" areas where trust boundaries can be unambiguously drawn. Do not allow sensitive data to go outside of the trust boundary and always be careful when interfacing with a compartment outside of the safe area. Ensure that appropriate compartmentalization is built into the system design, and the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.
  2. ImplementationEnsure that error messages only contain minimal details that are useful to the intended audience and no one else. The messages need to strike the balance between being too cryptic (which can confuse users) or being too detailed (which may reveal more than intended). The messages should not reveal the methods that were used to determine the error. Attackers can use detailed information to refine or optimize their original attack, thereby increasing their chances of success. If errors must be captured in some detail, record them in log messages, but consider what could occur if the log messages can be viewed by attackers. Highly sensitive information such as passwords should never be saved to log files. Avoid inconsistent messaging that might accidentally tip off an attacker about internal state, such as whether a user account exists or not.

Detection methods

The official record does not specify a detection method for this weakness.

Representative vulnerabilities

The following are representative examples, not an exhaustive list:

  • CVE-2002-2094: Monitors error responses during .. attacks, with overlap with directory traversal.
  • CVE-2001-1483: Enumerates valid usernames based on inconsistent responses.
  • CVE-2001-1528: Enumerates account numbers through inconsistent responses.
  • CVE-2004-2150 and CVE-2005-1650: Enable user enumeration through discrepancies in error messages.
  • CVE-2004-0294: A bulletin board displays different messages depending on whether a user exists, helping identify valid users and conduct brute-force password guessing.
  • CVE-2004-0243: An operating system displays different messages when direct remote login is disabled, enabling password guessing through brute-force methods.
  • CVE-2002-0514 and CVE-2002-0515: Different TTL values reveal whether a port is filtered.
  • CVE-2001-1387: The product may generate responses different from those specified by the administrator, potentially causing an information leak.
  • CVE-2004-0778: A version control system returns different errors for the -X option, revealing the existence of arbitrary files and directories.
  • CVE-2004-1428: An FTP server returns an error when a username does not exist instead of prompting for a password, revealing valid usernames.

Below are representative vulnerabilities related to this CWE, prioritized by severity.

Sources (2)

CWE™ Program, operated by The MITRE Corporation. Copyright © 2006–2026, The MITRE Corporation. The MITRE Corporation hereby grants you a non-exclusive, royalty-free license to use CWE for research, development, and commercial purposes. CWE Terms of Use.

Learn more

Run an in-depth assessment with complete web risk management

CyStack VulnScan continuously discovers assets, validates vulnerabilities, and helps security teams prioritize remediation across the organization.