Skip to content
OpenAdvisories

Weakness (CWE)

CWE-117: Improper Output Neutralization for Logs

Base Draft

The product constructs a log message from external input, but it does not neutralize or incorrectly neutralizes special elements when the message is written to a log file.

How to prevent it (3 mitigations)
  1. Implementation

    Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.

    When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."

    Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.

  2. Implementation

    Use and specify an output encoding that can be handled by the downstream component that is reading the output. Common encodings include ISO-8859-1, UTF-7, and UTF-8. When an encoding is not specified, a downstream component may choose a different encoding, either by assuming a default encoding or automatically inferring which encoding is being used, which can be erroneous. When the encodings are inconsistent, the downstream component might treat some character or byte sequences as special, even if they are not special in the original encoding. Attackers might then be able to exploit this discrepancy and conduct injection attacks; they even might be able to bypass protection mechanisms that assume the original encoding is also being used by the downstream component.

  3. Implementation

    Inputs should be decoded and canonicalized to the application's current internal representation before being validated (CWE-180). Make sure that the application does not decode the same input twice (CWE-174). Such errors could be used to bypass allowlist validation schemes by introducing dangerous inputs after they have been checked.

Source: MITRE CWE-117

106 results · Clear filters · Feed

  • Medium 5.0

    Ansible-core: possible information leak in tasks that ignore ansible_no_log configuration

    An information disclosure flaw was found in ansible-core due to a failure to respect the ANSIBLE_NO_LOG configuration in some scenarios. Information is still included in the output in certain tasks, such as loop items. Depending on the task, this issue may in…

  • Medium 4.3

    IBM SOAR QRadar Plugin App log injection

    IBM SOAR QRadar Plugin App 1.0 through 5.0.3 could allow an authenticated user to manipulate output written to log files. IBM X-Force ID: 260576.

  • Medium 6.3

    Sichuan Yougou Technology KuERP log neutralization for logs

    A vulnerability classified as critical has been found in Sichuan Yougou Technology KuERP up to 1.0.4. Affected is an unknown function of the file /runtime/log. The manipulation leads to improper output neutralization for logs. The exploit has been disclosed t…

  • Medium 5.3

    Integration Objects OPC UA Server Toolkit Improper Output Neutralization for Logs

    OPCUAServerToolkit will write a log message once an OPC UA client has successfully connected containing the client's self-defined description field.

  • Medium 4.9

    An improper output neutralization for logs in Fortinet FortiWeb 6.2.0 - 6.2.8, 6.3.0 - 6.3.23, 7.0.0 - 7.0.9, 7.2.0 - 7…

  • Medium 6.5

    Log Injection

    YugabyteDB is vulnerable to cross site scripting (XSS) via log injection. Writing invalidated user input to log files can allow an unprivileged attacker to forge log entries or inject malicious content into the logs.

  • Medium 5.5

    Operator: plaintext password in operator log

    A flaw was found in Red Hat AMQ Broker Operator, where it displayed a password defined in ActiveMQArtemisAddress CR, shown in plain text in the Operator Log. This flaw allows an authenticated local attacker to access information outside of their permissions.

  • Medium 4.9

    Log Injection vulnerability in SAP ERP Defense Forces and Public Security

    While using a specific function, SAP ERP Defense Forces and Public Security - versions 600, 603, 604, 605, 616, 617, 618, 802, 803, 804, 805, 806, 807, allows an authenticated attacker with admin privileges to write arbitrary data to the syslog file. On succe…

  • Medium 5.3

    Log Injection vulnerability in SAP NetWeaver AS for Java (Log Viewer)

    SAP NetWeaver AS for Java - versions ENGINEAPI 7.50, SERVERCORE 7.50, J2EE-APPS 7.50, allows an unauthenticated attacker to craft a request over the network which can result in unwarranted modifications to a system log without user interaction. There is no ab…

  • Medium 4.0

    A vulnerability exists in a FOXMAN-UN and UNEM logging component, it only affects systems that use remote authenticatio…

  • Medium 5.3

    A CWE-117: Improper Output Neutralization for Logs vulnerability exists that could cause the misinterpretation of log f…

  • Medium 4.6

    OpenDNS OpenResolve endpoints.py neutralization for logs

    A vulnerability classified as problematic has been found in OpenDNS OpenResolve. This affects an unknown part of the file resolverapi/endpoints.py. The manipulation leads to improper output neutralization for logs. The identifier of the patch is 9eba6ba5abd89…

  • Medium 5.3

    Cognex 3D-A1000 Dimensioning System Improper Output Neutralization for Logs

    The Cognex 3D-A1000 Dimensioning System in firmware version 1.0.3 (3354) and prior is vulnerable to CWE-117: Improper Output Neutralization for Logs, which allows an attacker to create false logs that show the password as having been changed when it is not, c…

  • Medium 5.3

    log injection in Sling logging

    Apache Sling Commons Log <= 5.4.0 and Apache Sling API <= 2.25.0 are vulnerable to log injection. The ability to forge logs may allow an attacker to cover tracks by injecting fake logs and potentially corrupt log files.

  • Medium 4.3

    Improper Output Neutralization for Logs in Crafter Studio

    An anonymous user can craft a URL with text that ends up in the log viewer as is. The text can then include textual messages to mislead the administrator.

  • Medium 6.5

    Possible log injection

    Improper output neutralization for Logs. A specific Apache Superset HTTP endpoint allowed for an authenticated user to forge log entries or inject malicious content into logs.

  • Medium 4.3

    Improper Output Neutralization for Logs in Spring Framework

    In Spring Framework versions 5.3.0 - 5.3.10, 5.2.0 - 5.2.17, and older unsupported versions, it is possible for a user to provide malicious input to cause the insertion of additional log entries.

  • Medium 5.3

    Server log entry spoofing via newline injection

    Sending specially crafted commands to a MongoDB Server may result in artificial log entries being generated or for log entries to be split. This issue affects MongoDB Server v3.6 versions prior to 3.6.20; MongoDB Server v4.0 versions prior to 4.0.21 and Mongo…

  • Medium 6.5

    GateManager Audit Message Spoofing Vulnerability

    The information disclosure vulnerability present in B&R GateManager 4260 and 9250 versions <9.0.20262 and GateManager 8250 versions <9.2.620236042 allows authenticated users to generate fake audit log messages.

  • Medium 5.5

    Insertion of Sensitive Information into Log File and Improper Output Neutralization for Logs in ansible

    A flaw was found in the Ansible Engine when using module_args. Tasks executed with check mode (--check-mode) do not properly neutralize sensitive data exposed in the event data. This flaw allows unauthorized users to read this data. The highest threat from th…

  • Medium 5.0

    Improper Output Neutralization and Improper Encoding or Escaping of Output for Logs in ansible

    An Improper Output Neutralization for Logs flaw was found in Ansible when using the uri module, where sensitive data is exposed to content and json output. This flaw allows an attacker to access the logs or outputs of performed tasks to read keys used in play…

  • Medium 5.3

    Log Forging in generator-jhipster-kotlin

    In generator-jhipster-kotlin version 1.6.0 log entries are created for invalid password reset attempts. As the email is provided by a user and the api is public this can be used by an attacker to forge log entries. This is vulnerable to https://cwe.mitre.org/…

  • Medium 5.3

    OpenShift Container Platform 4 does not sanitize secret data written to static pod logs when the log level in a given o…

  • Medium 5.7

    Inclusion of Sensitive Information in Log Files and Improper Output Neutralization for Logs in Ansible

    Ansible, versions 2.9.x before 2.9.1, 2.8.x before 2.8.7 and Ansible versions 2.7.x before 2.7.15, is not respecting the flag no_log set it to True when Sumologic and Splunk callback plugins are used send tasks results events to collectors. This would disclos…

  • Medium 5.3

    OpenShift Container Platform, versions 4.1 and 4.2, does not sanitize secret data written to pod logs when the log leve…

  • Medium 4.3

    lldptool version 1.0.1 and older can print a raw, unsanitized attacker controlled buffer when mngAddr information is di…