CWE-210 Base Draft

Self-generated Error Message Containing Sensitive Information

This vulnerability occurs when an application detects a problem and generates its own error messages that accidentally expose sensitive system or user data.

Definition

What is CWE-210?

This vulnerability occurs when an application detects a problem and generates its own error messages that accidentally expose sensitive system or user data.
Instead of using generic, safe error messages, the application crafts detailed responses that can reveal internal information. This might include database structure, server paths, configuration secrets, user credentials, or personal data, giving attackers valuable clues for further exploitation. Developers often create these verbose errors during debugging and forget to replace them before release. To prevent this, always use a centralized, secure logging and error-handling system that separates detailed diagnostic information (for internal logs) from benign, user-facing messages. Never let internal exception details or system information leak to end-users, APIs, or client-side code.
Auswirkungen in der Praxis

Real-world CVEs caused by CWE-210

  • Infoleak of sensitive information in error message (physical access required).

Wie Angreifer es ausnutzen

Angreiferpfad Schritt für Schritt

  1. 1

    Identifiziere einen Codepfad, der nicht vertrauenswürdige Eingaben ohne Validierung verarbeitet.

  2. 2

    Erzeuge eine Payload, die das unsichere Verhalten auslöst — Injection, Traversal, Overflow oder Logik-Missbrauch.

  3. 3

    Liefere die Payload über einen normalen Request aus und beobachte die Reaktion der Anwendung.

  4. 4

    Iteriere, bis die Antwort Daten preisgibt, Angreifer-Code ausführt oder Berechtigungen eskaliert.

Verwundbares Codebeispiel

Vulnerable Perl

The following code uses custom configuration files for each user in the application. It checks to see if the file exists on the system before attempting to open and use the file. If the configuration file does not exist, then an error is generated, and the application exits.

Verwundbar Perl
$uname = GetUserInput("username");
```
# avoid CWE-22, CWE-78, others.* 
  if ($uname !~ /^\w+$/)
  {
  ```
  	ExitError("Bad hacker!") ;
  }
  $filename = "/home/myprog/config/" . $uname . ".txt";
  if (!(-e $filename))
  {
  	ExitError("Error: $filename does not exist");
  }
Sicheres Codebeispiel

Secure pseudo

Sicher 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.
Präventions-Checkliste

How to prevent CWE-210

  • Implementation / Build and Compilation Debugging information should not make its way into a production release.
  • Implementation / Build and Compilation Debugging information should not make its way into a production release.
Erkennungssignale

How to detect CWE-210

SAST High

Führe statische Analyse (SAST) auf der Codebasis aus und suche im Datenfluss nach dem unsicheren Muster.

DAST Moderate

Führe dynamische Application-Security-Tests gegen den Live-Endpoint aus.

Runtime Moderate

Beobachte Runtime-Logs auf ungewöhnliche Exception-Traces, fehlerhafte Eingaben oder Versuche, Autorisierung zu umgehen.

Code review Moderate

Code Review: Markiere jeden neuen Code, der Eingaben von dieser Oberfläche ohne validierte Framework-Helper verarbeitet.

Plexicus Auto-Fix

Plexicus erkennt CWE-210 automatisch und öffnet in unter 60 Sekunden einen Fix-PR.

Codex Remedium scannt jeden Commit, identifiziert genau diese Schwachstelle und liefert einen reviewer-ready Pull Request mit dem Patch. Keine Tickets. Keine Hand-offs.

Häufig gestellte Fragen

Frequently asked questions

Was ist CWE-210?

This vulnerability occurs when an application detects a problem and generates its own error messages that accidentally expose sensitive system or user data.

Wie gravierend ist CWE-210?

MITRE hat für diese Schwachstelle keine Exploit-Wahrscheinlichkeit veröffentlicht. Behandle sie als mittlere Auswirkung, bis dein Threat Model anderes belegt.

Welche Sprachen oder Plattformen sind von CWE-210 betroffen?

MITRE hat für diese CWE keine betroffenen Plattformen spezifiziert — sie kann in den meisten Anwendungs-Stacks auftreten.

Wie kann ich CWE-210 verhindern?

Debugging information should not make its way into a production release. Debugging information should not make its way into a production release.

Wie erkennt und behebt Plexicus CWE-210?

Die SAST-Engine von Plexicus erkennt die Datenfluss-Signatur von CWE-210 bei jedem Commit. Bei einem Treffer öffnet unser Codex-Remedium-Agent einen Fix-PR mit korrigiertem Code, Tests und einer einzeiligen Zusammenfassung für den Reviewer.

Wo erfahre ich mehr über CWE-210?

MITRE veröffentlicht die kanonische Definition unter https://cwe.mitre.org/data/definitions/210.html. Für ergänzende Hinweise kannst du auch die OWASP- und NIST-Dokumentation heranziehen.

Bereit, wenn du es bist

Schluss mit dem Bezahlen pro Entwickler.
Schließ den Kreislauf.

Plexicus ist die KI-native ASPM, die scannt, filtert, fixt, pentestet und erklärt — autonom. Unbegrenzte Entwickler, unbegrenzte Repos, Fair-Use-KI-Aktionen. Echter kostenloser Tarif, €269/mo jährlich, wenn du bereit bist.