The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
There are many different kinds of mistakes that introduce information exposures. The severity of the error can range widely, depending on the context in which the product operates, the type of sensitive information that is revealed, and the benefits it may provide to an attacker. Some kinds of sensitive information include: private, personal information, such as personal messages, financial data, health records, geographic location, or contact details system status and environment, such as the operating system and installed packages business secrets and intellectual property network status and configuration the product's own code or internal state metadata, e.g. logging of connections or message headers indirect information, such as a discrepancy between two internal operations that can be observed by an outsider Information might be sensitive to different parties, each of which may have their own expectations for whether the information should be protected. These parties include: the product's own users people or organizations whose information is created or used by the product, even if they are not direct product users the product's administrators, including the admins of the system(s) and/or networks on which the product operates the developer Information exposures can occur in different ways: the code explicitly inserts sensitive information into resources or messages that are intentionally made accessible to unauthorized actors, but should not contain the information - i.e., the information should have been "scrubbed" or "sanitized" a different weakness or mistake indirectly inserts the sensitive information into resources, such as a web script error revealing the full system path of the program. the code manages resources that intentionally contain sensitive information, but the resources are unintentionally made accessible to unauthorized actors. In this case, the information exposure is resultant - i.e., a different weakness enabled the access to the information in the first place. It is common practice to describe any loss of confidentiality as an "information exposure," but this can lead to overuse of CWE-200 in CWE mapping. From the CWE perspective, loss of confidentiality is a technical impact that can arise from dozens of different weaknesses, such as insecure file permissions or out-of-bounds read. CWE-200 and its lower-level descendants are intended to cover the mistakes that occur in behaviors that explicitly manage, store, transfer, or cleanse sensitive information.
Threat Mapped score: 3.25
Industry: Finiancial
Threat priority: P2 - Serious (High)
CVE: CVE-2022-31162
Rust library leaks Oauth client details in application debug logs
CVE: CVE-2021-25476
Digital Rights Management (DRM) capability for mobile platform leaks pointer information, simplifying ASLR bypass
CVE: CVE-2001-1483
Enumeration of valid usernames based on inconsistent responses
CVE: CVE-2001-1528
Account number enumeration via inconsistent responses.
CVE: CVE-2004-2150
User enumeration via discrepancies in error messages.
CVE: CVE-2005-1205
Telnet protocol allows servers to obtain sensitive environment information from clients.
CVE: CVE-2002-1725
Script calls phpinfo(), revealing system configuration to web user
CVE: CVE-2002-0515
Product sets a different TTL when a port is being filtered than when it is not being filtered, which allows remote attackers to identify filtered ports by comparing TTLs.
CVE: CVE-2004-0778
Version control system allows remote attackers to determine the existence of arbitrary files and directories via the -X command for an alternate history file, which causes different error messages to be returned.
CVE: CVE-2000-1117
Virtual machine allows malicious web site operators to determine the existence of files on the client by measuring delays in the execution of the getSystemResource method.
CVE: CVE-2003-0190
Product immediately sends an error message when a user does not exist, which allows remote attackers to determine valid usernames via a timing attack.
CVE: CVE-2008-2049
POP3 server reveals a password in an error message after multiple APOP commands are sent. Might be resultant from another weakness.
CVE: CVE-2007-5172
Program reveals password in error message if attacker can trigger certain database errors.
CVE: CVE-2008-4638
Composite: application running with high privileges (CWE-250) allows user to specify a restricted file to process, which generates a parsing error that leaks the contents of the file (CWE-209).
CVE: CVE-2007-1409
Direct request to library file in web application triggers pathname leak in error message.
CVE: CVE-2005-0603
Malformed regexp syntax leads to information exposure in error message.
CVE: CVE-2004-2268
Password exposed in debug information.
CVE: CVE-2003-1078
FTP client with debug option enabled shows password to the screen.
CVE: CVE-2022-0708
Collaboration platform does not clear team emails in a response, allowing leak of email addresses
Phase | Note |
---|---|
Architecture and Design | N/A |
Implementation | N/A |
Intro: The following code checks validity of the supplied username and password and notifies the user of a successful or failed login.
Body: In the above code, there are different messages for when an incorrect username is supplied, versus when the username is correct but the password is wrong. This difference enables a potential attacker to understand the state of the login function, and could allow an attacker to discover a valid username by trying different values until the incorrect password message is returned. In essence, this makes it easier for an attacker to obtain half of the necessary authentication credentials.
my $username=param('username'); my $password=param('password'); if (IsValidUsername($username) == 1) { if (IsValidPassword($username, $password) == 1) { print "Login Successful"; } else { print "Login Failed - incorrect password"; } } else { print "Login Failed - unknown username"; }
Intro: This code tries to open a database connection, and prints any exceptions that occur.
Body: If an exception occurs, the printed message exposes the location of the configuration file the script is using. An attacker can use this information to target the configuration file (perhaps exploiting a Path Traversal weakness). If the file can be read, the attacker could gain credentials for accessing the database. The attacker may also be able to replace the file with a malicious one, causing the application to use an arbitrary database.
try { openDbConnection(); } //print exception message that includes exception message and configuration file location catch (Exception $e) { echo 'Caught exception: ', $e->getMessage(), '\n'; echo 'Check credentials in config file at: ', $Mysql_config_location, '\n'; }
Intro: In the example below, the method getUserBankAccount retrieves a bank account object from a database using the supplied username and account number to query the database. If an SQLException is raised when querying the database, an error message is created and output to a log file.
Body: The error message that is created includes information about the database query that may contain sensitive information about the database or query logic. In this case, the error message will expose the table name and column names used in the database. This data could be used to simplify other attacks, such as SQL injection (CWE-89) to directly access the database.
public BankAccount getUserBankAccount(String username, String accountNumber) { BankAccount userAccount = null; String query = null; try { if (isAuthorizedUser(username)) { query = "SELECT * FROM accounts WHERE owner = " + username + " AND accountID = " + accountNumber; DatabaseManager dbManager = new DatabaseManager(); Connection conn = dbManager.getConnection(); Statement stmt = conn.createStatement(); ResultSet queryResult = stmt.executeQuery(query); userAccount = (BankAccount)queryResult.getObject(accountNumber); } } catch (SQLException ex) { String logMessage = "Unable to retrieve account information from database,\nquery: " + query; Logger.getLogger(BankManager.class.getName()).log(Level.SEVERE, logMessage, ex); } return userAccount; }
Intro: This code stores location information about the current user:
Body: When the application encounters an exception it will write the user object to the log. Because the user object contains location information, the user's location is also written to the log.
locationClient = new LocationClient(this, this, this); locationClient.connect(); currentUser.setLocation(locationClient.getLastLocation()); ... catch (Exception e) { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setMessage("Sorry, this application has experienced an error."); AlertDialog alert = builder.create(); alert.show(); Log.e("ExampleActivity", "Caught exception: " + e + " While on User:" + User.toString()); }
Intro: The following is an actual MySQL error statement:
Body: The error clearly exposes the database credentials.
Warning: mysql_pconnect(): Access denied for user: 'root@localhost' (Using password: N1nj4) in /usr/local/www/wi-data/includes/database.inc on line 4
Intro: This code displays some information on a web page.
Body: The code displays a user's credit card and social security numbers, even though they aren't absolutely necessary.
Social Security Number: <%= ssn %></br>Credit Card Number: <%= ccn %>
Intro: The following program changes its behavior based on a debug flag.
Body: The code writes sensitive debug information to the client browser if the "debugEnabled" flag is set to true .
<% if (Boolean.getBoolean("debugEnabled")) { %> User account number: <%= acctNo %> <% } %>
Intro: This code uses location to determine the user's current US State location.
Body: First the application must declare that it requires the ACCESS_FINE_LOCATION permission in the application's manifest.xml:
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>