CVE Vulnerabilities

CVE-2024-9026

Improper Output Neutralization for Logs

Published: Oct 08, 2024 | Modified: Aug 19, 2025
CVSS 3.x
3.3
LOW
Source:
NVD
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N
CVSS 2.x
RedHat/V2
RedHat/V3
3.3 LOW
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N
Ubuntu
MEDIUM

In PHP versions 8.1.* before 8.1.30, 8.2.* before 8.2.24, 8.3.* before 8.3.12, when using PHP-FPM SAPI and it is configured to catch workers output through catch_workers_output = yes, it may be possible to pollute the final log or remove up to 4 characters from the log messages by manipulating log message content. Additionally, if PHP-FPM is configured to use syslog output, it may be possible to further remove log data using the same vulnerability.

Weakness

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.

Affected Software

Name Vendor Start Version End Version
Php Php 8.1.0 (including) 8.1.30 (excluding)
Php Php 8.2.0 (including) 8.2.24 (excluding)
Php Php 8.3.0 (including) 8.3.12 (excluding)
Red Hat Enterprise Linux 8 RedHat php:8.2-8100020241112130045.f7998665 *
Red Hat Enterprise Linux 8 RedHat php:7.4-8100020241113075828.f7998665 *
Red Hat Enterprise Linux 9 RedHat php:8.2-9050020241112094217.9 *
Red Hat Enterprise Linux 9 RedHat php:8.1-9050020241112144108.9 *
Red Hat Enterprise Linux 9 RedHat php-0:8.0.30-2.el9 *
Php8.1 Ubuntu jammy *
Php8.1 Ubuntu upstream *
Php8.3 Ubuntu devel *
Php8.3 Ubuntu noble *
Php8.3 Ubuntu upstream *

Potential Mitigations

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

References