CWE-200 Clase Borrador High likelihood

Exposure of Sensitive Information to an Unauthorized Actor

This weakness occurs when an application unintentionally reveals sensitive data to someone who shouldn't have access to it.

Definición

What is CWE-200?

This weakness occurs when an application unintentionally reveals sensitive data to someone who shouldn't have access to it.
An information exposure happens when sensitive data leaks from your system. This can include personal user details like financial or health information, internal system data such as configuration or logs, business secrets, or even metadata about your application's operations. The leak can be direct, like accidentally including private data in an error message, or indirect, where another vulnerability allows unauthorized access to protected resources. The impact depends heavily on what's exposed and who sees it. Different parties—end users, administrators, or third parties—have different expectations of privacy. While many vulnerabilities can lead to data leaks, this specific weakness focuses on errors in how the code itself handles, transmits, or sanitizes sensitive information, rather than broader access control failures.
Impacto en el mundo real

Real-world CVEs caused by CWE-200

  • Rust library leaks Oauth client details in application debug logs

  • Digital Rights Management (DRM) capability for mobile platform leaks pointer information, simplifying ASLR bypass

  • Enumeration of valid usernames based on inconsistent responses

  • Account number enumeration via inconsistent responses.

  • User enumeration via discrepancies in error messages.

  • Telnet protocol allows servers to obtain sensitive environment information from clients.

  • Script calls phpinfo(), revealing system configuration to web user

  • 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.

Cómo lo explotan los atacantes

Ruta del atacante paso a paso

  1. 1

    The following code checks validity of the supplied username and password and notifies the user of a successful or failed login.

  2. 2

    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.

  3. 3

    While this type of information may be helpful to a user, it is also useful to a potential attacker. In the above example, the message for both failed cases should be the same, such as:

  4. 4

    This code tries to open a database connection, and prints any exceptions that occur.

  5. 5

    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.

Ejemplo de código vulnerable

Vulnerable Perl

The following code checks validity of the supplied username and password and notifies the user of a successful or failed login.

Vulnerable Perl
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"; 
  }
Ejemplo de código seguro

Secure pseudo

Seguro pseudo
// Validate, sanitize, or use a safe API before reaching the sink.
function handleRequest(input) {
  const safe = validateAndEscape(input);
  return executeWithGuards(safe);
}
What changed: the unsafe sink is replaced (or the input is validated/escaped) so the same payload no longer triggers the weakness.
Lista de prevención

How to prevent CWE-200

  • Architecture and Design Compartmentalize 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.
Señales de detección

How to detect CWE-200

Automated Static Analysis - Binary or Bytecode SOAR Partial

According to SOAR [REF-1479], the following detection techniques may be useful: ``` Cost effective for partial coverage: ``` Bytecode Weakness Analysis - including disassembler + source code weakness analysis Inter-application Flow Analysis

Dynamic Analysis with Automated Results Interpretation High

According to SOAR [REF-1479], the following detection techniques may be useful: ``` Highly cost effective: ``` Web Application Scanner Web Services Scanner Database Scanners

Dynamic Analysis with Manual Results Interpretation SOAR Partial

According to SOAR [REF-1479], the following detection techniques may be useful: ``` Cost effective for partial coverage: ``` Fuzz Tester Framework-based Fuzzer Automated Monitored Execution Monitored Virtual Environment - run potentially malicious code in sandbox / wrapper / virtual machine, see if it does anything suspicious

Manual Static Analysis - Source Code High

According to SOAR [REF-1479], the following detection techniques may be useful: ``` Highly cost effective: ``` Manual Source Code Review (not inspections)

Automated Static Analysis - Source Code High

According to SOAR [REF-1479], the following detection techniques may be useful: ``` Highly cost effective: ``` Context-configured Source Code Weakness Analyzer ``` Cost effective for partial coverage: ``` Source code Weakness Analyzer

Architecture or Design Review High

According to SOAR [REF-1479], the following detection techniques may be useful: ``` Highly cost effective: ``` Formal Methods / Correct-By-Construction ``` Cost effective for partial coverage: ``` Attack Modeling Inspection (IEEE 1028 standard) (can apply to requirements, design, source code, etc.)

Auto-corrección de Plexicus

Plexicus detecta automáticamente CWE-200 y abre un PR de corrección en menos de 60 segundos.

Codex Remedium escanea cada commit, identifica esta debilidad concreta y entrega un pull request listo para revisión con el parche. Sin tickets. Sin traspasos.

Preguntas frecuentes

Frequently asked questions

¿Qué es CWE-200?

This weakness occurs when an application unintentionally reveals sensitive data to someone who shouldn't have access to it.

¿Qué gravedad tiene CWE-200?

MITRE califica la probabilidad de explotación como Alta — esta debilidad se explota activamente en la práctica y debe priorizarse para su remediación.

¿Qué lenguajes o plataformas se ven afectados por CWE-200?

MITRE lists the following affected platforms: Mobile.

¿Cómo puedo prevenir CWE-200?

Compartmentalize 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…

¿Cómo detecta y corrige Plexicus CWE-200?

El motor SAST de Plexicus detecta la firma de flujo de datos para CWE-200 en cada commit. Cuando hay coincidencia, nuestro agente Codex Remedium abre un PR de corrección con el código corregido, las pruebas y un resumen de una línea para el revisor.

¿Dónde puedo aprender más sobre CWE-200?

MITRE publica la definición canónica en https://cwe.mitre.org/data/definitions/200.html. También puedes consultar la documentación de OWASP y NIST para guías relacionadas.

Debilidades relacionadas

Weaknesses related to CWE-200

CWE-668 Padre

Exposure of Resource to Wrong Sphere

This vulnerability occurs when an application unintentionally makes a resource accessible to users or systems that should not have…

CWE-1189 Hermano

Improper Isolation of Shared Resources on System-on-a-Chip (SoC)

This vulnerability occurs when a System-on-a-Chip (SoC) fails to properly separate shared hardware resources between secure (trusted) and…

CWE-1282 Hermano

Assumed-Immutable Data is Stored in Writable Memory

This vulnerability occurs when data that should be permanent and unchangeable—like a bootloader, device IDs, or one-time configuration…

CWE-1327 Hermano

Binding to an Unrestricted IP Address

This vulnerability occurs when software or a service is configured to bind to the IP address 0.0.0.0 (or :: in IPv6), which acts as a…

CWE-1331 Hermano

Improper Isolation of Shared Resources in Network On Chip (NoC)

This vulnerability occurs when a Network on Chip (NoC) fails to properly separate its internal, shared resources—like buffers, switches,…

CWE-134 Hermano

Use of Externally-Controlled Format String

This vulnerability occurs when a program uses a format string from an untrusted, external source (like user input, a network packet, or a…

CWE-374 Hermano

Passing Mutable Objects to an Untrusted Method

This vulnerability occurs when a function receives a direct reference to mutable data, such as an object or array, instead of a safe copy…

CWE-375 Hermano

Returning a Mutable Object to an Untrusted Caller

This vulnerability occurs when a method directly returns a reference to its internal mutable data, allowing untrusted calling code to…

CWE-377 Hermano

Insecure Temporary File

This vulnerability occurs when an application creates temporary files with insecure permissions or in predictable locations, allowing…

Listo cuando tú lo estés

Deja de pagar por desarrollador.
Empieza a cerrar el bucle.

Plexicus es el ASPM nativo de IA que escanea, filtra, corrige, pentestea y explica — de forma autónoma. Desarrolladores ilimitados, repos ilimitados, acciones de IA de uso justo. Nivel gratuito real, €269/mo anual cuando estés listo.