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

151 results · Feed

  • Medium 6.5

    It was possible for an authenticated non-admin user to modify certain data objects without having the appropriate permi…

  • Medium 5.3

    compose-lint: Compose file text can issue GitHub Actions workflow commands through the compose-lint Action

    compose-lint is a Docker Compose security linter that identifies dangerous misconfigurations before deployment. Prior to 0.31.0, compose-lint prints attacker-controlled service names, environment keys, file lines, and other Compose text without neutralizing G…

  • Unscored —

    Apache Sling Engine: Request-derived values reach log sinks without CR/LF neutralization

    Improper output neutralization for logs in Apache Sling Engine. This issue affects Apache Sling Engine: before 3.0.4. Users are recommended to upgrade to version 3.0.4, which fixes the issue.

  • Medium 5.3

    Unauthenticated Audit Log Spoofing in API of HPE Networking Fabric Composer

    An audit log spoofing vulnerability exists in the API of HPE Networking Fabric Composer. Successful exploitation could allow an unauthenticated remote attacker to falsify the client address recorded in audit records.

  • Medium 5.3

    Potential log injection via unescaped geometry form values

    An issue was discovered in Django 6.1 before 6.1.3, 6.0 before 6.0.10, and 5.2 before 5.2.19. `django.contrib.gis.forms.widgets.BaseGeometryWidget.deserialize()`, used by `django.contrib.gis.forms.GeometryField`, does not escape invalid submitted values befor…

  • Critical 9.8

    CallBackery versions before 0.62.0 for Perl allow log injection via newlines in the login name

    CallBackery versions before 0.62.0 for Perl allow log injection via newlines in the login name. login() writes the login name to the application log without escaping control characters. The login RPC method needs no authentication, so a name containing a newl…

  • Medium 5.3

    OPNsense core before 26.7.8 Lockout IP Planting via WebGUI Login Username

    OPNsense core before 26.7.8 contains a log injection vulnerability that allows unauthenticated attackers to plant victim IP addresses in the lockout_handler by submitting crafted WebGUI login usernames. Attackers can submit usernames like 'Invalid user <victi…

  • High 8.1

    Other issue in the Console component

    Other issue in the Console component. This vulnerability was fixed in Firefox 159, Firefox ESR 153.6, Thunderbird 159, and Thunderbird 153.6.

  • Medium 5.3

    IBM Concert Software Improper Output Neutralization for Logs

    IBM Concert 1.0 through 3.0.0 could allow an unauthorized user to inject data into log messages due to improper neutralization of special elements when written to log files.

  • High 8.1

    OPNsense: Log Forgery via Login Username CRLF in WebGUI Authentication → Pf Table IP Blocking

    OPNsense is a FreeBSD based firewall and routing platform. Prior to version 26.1.11, the unauthenticated WebGUI login usernamefld accepts carriage-return and line-feed characters that survive LOG_AUTH processing through syslog-ng-lockout.conf into the syslog-…

  • Medium 5.3

    In fail2ban 0.10.5 through 1.1.1 before ddd879d, the sshd filter (config/filter.d/sshd.conf) accepts an "on <token>" su…

  • Medium 5.8

    OWASP Coraza WAF: Native audit-log format allows CRLF injection and log forgery via request body and header fields

    OWASP Coraza WAF is a golang modsecurity compatible web application firewall library. From 3.0.0 until 3.8.0, the Native audit-log formatter in internal/auditlog/formats.go writes attacker-influenced request and response fields without neutralizing carriage r…

  • Medium 4.3

    Log Injection through the REST API in Splunk App for Splunk O11y Cloud

    In Splunk Enterprise versions below 10.4.3, 10.2.7, and 10.0.10, a user that holds a role with the read_o11y_content capability could inject forged entries into the app log through the Representational State Transfer (REST) API. The vulnerability is possible …

  • Medium 5.3

    InvoicePlane: Log Injection via Unsanitized User Input in Cron Key Error Logging

    InvoicePlane is a self-hosted open source application for managing invoices, clients, and payments. Prior to 1.7.2, InvoicePlane's Cron::recur() method writes an invalid cron key from the URL path directly to the application log without neutralizing CRLF char…

  • Medium 5.3

    Mesop: Unauthenticated ANSI Escape Sequence Injection in CSP Reporting Endpoint

    Mesop is a Python-based UI framework that allows users to build web applications. Prior to 1.3.4, the unauthenticated /__csp__ endpoint passes attacker-controlled document-uri, blocked-uri, and violated-directive values to the csp_report handler in mesop/serv…

  • Medium 4.3

    Multiple Vulnerabilities in IBM Concert Software

    IBM Concert 1.0.0 through 3.0.0 could allow an unauthorized user to inject data into log messages due to improper neutralization of special elements when written to log files.

  • Low 3.7

    IBM WebSphere Application Server prior to 9.0.5.29 and 8.5.5.31 are affected by multiple vulnerabilities

    IBM WebSphere Application Server 9.0 and 8.5 is affected by a log injection vulnerability through crafted LTPA token cookies.

  • Medium 6.3

    Log injection via an unescaped password reset identity in AshAuthentication

    Improper Output Neutralization for Logs vulnerability in team-alembic AshAuthentication allows an unauthenticated attacker to forge application log entries by submitting a password reset identity containing newlines or control characters. AshAuthentication.St…

  • Medium 5.3

    Apache ZooKeeper: Operational log forgery via newline injection in EnsembleAuthenticationProvider

    An unauthenticated attacker can inject arbitrary fake log lines into Apache ZooKeeper's operational log by sending a crafted add_auth("ensemble", ...) request containing newline characters (\n). When the ensemble name doesn't match, EnsembleAuthenticationProv…

  • Medium 5.3

    Apache ZooKeeper: Audit log injection via unsanitized output from multiple sources

    When audit logging is enabled (zookeeper.audit.enable=true), an unauthenticated attacker can inject arbitrary fields into Apache ZooKeeper's audit log by sending a digest authentication request with tab characters (\t) embedded in the username. Because the au…

  • Medium 5.3

    IBM WebSphere Application Server prior to 9.0.5.29 and 8.5.5.31 are affected by multiple vulnerabilities

    IBM WebSphere Application Server 9.0, and 8.5 could allow a remote attacker to inject forged log entries into the server's administrative log.

  • Medium 4.8

    IBM WebSphere Application Server prior to 9.0.5.29 and 8.5.5.31 are affected by multiple vulnerabilities

    IBM WebSphere Application Server 9.0, and 8.5 could allow a remote attacker to inject forged log entries into the server's administrative log.

  • Medium 5.3

    morgan vulnerable to Log Injection via unescaped double quote in quoted log fields

    morgan is an HTTP request logger middleware for Node.js. In versions before 1.12.1, its escapeLogField() function does not escape the double quote character, which delimits the quoted fields of the Apache combined log format that morgan emits. An unauthentica…

  • Medium 5.3

    Vulnerabilities exists in IBM Cloud Pak for Data System

    IBM Cloud Pak for Data System 11.3.0.2 through Interim Fix 001 could allow an unauthorized user to inject data into log messages due to improper neutralization of special elements when written to log files.

  • Medium 5.3

    Vulnerabilities exists in IBM Netezza Software

    IBM Netezza Software 11.3.0.3 through Interim Fix 002 could allow an unauthorized user to inject data into log messages due to improper neutralization of special elements when written to log files.

  • Medium 5.3

    morgan vulnerable to Log Forging via unescaped Unicode line separators

    morgan is an HTTP request logger middleware for Node.js. In versions prior to 1.12.0, the internal helper that escapes log token values did not neutralize the Unicode line separator characters U+0085 (Next Line), U+2028 (Line Separator), and U+2029 (Paragraph…

  • Low 3.3

    openssl_encrypt before 1.4.9 Terminal Injection via info Command

    openssl_encrypt versions before 1.4.9 fail to sanitize terminal control characters in file metadata printed by the info command. Attackers can craft malicious files containing escape sequences to repaint terminal output and forge verification information disp…

  • Low 3.3

    openssl_encrypt before 1.4.9 Terminal Injection via key_id

    openssl_encrypt versions before 1.4.9 fail to escape attacker-controlled key_id values printed to stderr during decrypt auto-detection. Attackers can craft encrypted files with malicious key_id containing escape sequences to repaint terminal output and forge …

  • Low 3.3

    openssl-encrypt before 1.4.9 Output Injection via Unsanitized Filenames in verify-usb Command

    openssl-encrypt (pip package, versions <= 1.4.8) fails to sanitize filenames read from untrusted drive data (outside the AES-GCM authenticated manifest) before printing them in the verify-usb command's output. An attacker can plant filenames containing termin…

  • High 8.6

    @logtape/syslog: syslog log injection via unescaped control characters and unvalidated SD-NAME keys

    LogTape is an unobtrusive logging library. Prior to 1.3.11, 2.0.14, and 2.1.5, the @logtape/syslog package's escapeStructuredDataValue() function in packages/syslog/src/syslog.ts does not neutralize C0 control characters from U+0000 through U+001F in structur…

  • Low —

    netfoil vulnerable to improper handling of untrusted DoH response data

    ### Summary HTTPS RR data returned from the DoH server was not properly handled. Unverified APLN data (which could contain arbitrary byte sequences) was written directly to the log. It could also cause unnecessary memory usage. The single-byte response code w…

  • Medium 5.3

    Wazuh: CRLF Log Injection via Unsanitized Basic-Auth Username

    Wazuh is a free and open source platform used for threat prevention, detection, and response. From 4.4.0 until 4.14.6 and 5.0.0-beta2, api/api/middlewares.py decodes the Basic authentication username before credential validation and passes it to the access lo…

  • Low 3.6

    openssl_encrypt before 1.4.0 Logging Bug and Race Condition

    openssl_encrypt versions before 1.4.0 contain a logging bug in restore_hidden_modules() that logs module counts after clearing, always showing zero restored modules and corrupting audit trails. Additionally, a race condition exists between module hiding and i…

  • High 8.8

    IBM Documentation Offline is vulnerable to information disclosure, session forgery and remote code execution

    IBM Documentation Offline 1.0.0 through 1.4.1 could allow a remote attacker to execute arbitrary code due to improper output neutralization for logs.

  • Medium 4.3

    IBM i is Affected By Multiple Vulnerabilities in Navigator for i

    IBM i 7.6, 7.5, 7.4, and 7.3 could allow a remote authenticated attacker to inject arbitrary content into Navigator log files due to improper output neutralization for logs.

    IBM i
  • Medium 6.5

    OpenReception: Unauthenticated POST /api/log accepts arbitrary content with CRLF injection and no size or rate limits

    OpenReception's appointment booking software provides an end-to-end encrypted appointment booking platform. Prior to version 1.0.2, the `/api/log` endpoint accepts unauthenticated POST requests, applies no schema validation to the message body, writes attacke…

  • Critical 9.6

    OpenWrt odhcpd/LuCI: unauthenticated DHCPv6 client can inject lease-file lines via FQDN hostname → stored XSS in the LuCI admin UI

    OpenWrt is a Linux operating system targeting embedded devices. Prior to 25.12.5, odhcpd writes a DHCPv6 client FQDN option 39 hostname into /tmp/odhcpd.leases through src/statefiles.c statefiles_write_state6() and statefiles_write_state4() without escaping, …

  • Low —

    netfoil: Attacker controlled data written to logs

    ### Summary Domain names were written to the log without first being validated to contain allowed characters. ### Impact Depends on how the logs were used.

  • Medium 6.9

    The /v1/upload/sbom endpoint extracts the iss claim from the attacker-supplied JWT with signature verification disabled…

  • High 7.9

    Improper output neutralization for logs vulnerability in upKeeper Solutions upKeeper Instant Privilege Access on Window…