{"vuln_id":"CVE-2024-9026","aliases":["CVE-2024-8925","CVE-2024-8926","CVE-2024-8927","GHSA-865w-9rf3-2wh5"],"description":"php8.2 - security update","published_at":"2024-09-27T17:50:07Z","modified_at":"2026-11-20T01:19:10.140574Z","first_seen_at":"2026-11-21T19:15:06.060523Z","severity":"low","severity_source":"cvss","cvss_score":3.3,"cvss_vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N","cwe":["CWE-117"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":0.00483,"epss_percentile":0.42191,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2024-9026"},"matched_alias":null,"items":[{"id":489,"source":{"id":"debian-php","name":"Debian 12 php8.2 (package vulnerabilities)"},"title":"php8.2 (Debian:12): DEBIAN-CVE-2024-9026 / CVE-2024-9026 - 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 cat…","summary":"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.\n\nAffected: Debian:12:php8.2\n\nFixed in: 8.2.24-1~deb12u1\n\nReferences:\nhttps://security-tracker.debian.org/tracker/CVE-2024-9026","url":"https://osv.dev/vulnerability/DEBIAN-CVE-2024-9026","published_at":"2024-10-08T04:15:11.060000Z","updated_at":"2026-11-02T12:03:15.828157Z","fetched_at":"2026-11-21T19:15:05.963738Z","severity":"low","cvss_score":3.3,"epss":0.00483,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":"php","product":"php8.2","vuln_id":"CVE-2024-9026","vuln_ids":["CVE-2024-8925","CVE-2024-8926","CVE-2024-8927","CVE-2024-9026","DEBIAN-CVE-2024-9026","GHSA-865W-9RF3-2WH5"],"tags":["package-watch","pkg:php8.2","fix-available"],"cluster_id":378,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/489","html":"https://vulnwatch.ve1ve2.com/item/489"}},{"id":483,"source":{"id":"debian-php","name":"Debian 12 php8.2 (package vulnerabilities)"},"title":"php8.2 (Debian:12): DSA-5780-1 / CVE-2024-8925 - php8.2 - security update","summary":"Affected: Debian:12:php8.2\n\nFixed in: 8.2.24-1~deb12u1","url":"https://osv.dev/vulnerability/DSA-5780-1","published_at":"2024-10-02T00:00:00Z","updated_at":"2026-11-20T01:19:10.140574Z","fetched_at":"2026-11-21T19:15:05.963730Z","severity":"high","cvss_score":8.8,"epss":0.03662,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":"php","product":"php8.2","vuln_id":"CVE-2024-8925","vuln_ids":["CVE-2024-4577","CVE-2024-8925","CVE-2024-8926","CVE-2024-8927","CVE-2024-9026","DSA-5780-1","GHSA-865W-9RF3-2WH5","GHSA-94P6-54JQ-9MWP","GHSA-9PQP-7H25-4F32","GHSA-P99J-RFP4-XQVQ","GHSA-VXPP-6299-MXW3"],"tags":["package-watch","pkg:php8.2","fix-available"],"cluster_id":375,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/483","html":"https://vulnwatch.ve1ve2.com/item/483"}},{"id":12671,"source":{"id":"gh-php-src","name":"PHP releases (GitHub php/php-src tags)"},"title":"GHSA-865w-9rf3-2wh5 / CVE-2024-9026: [PHP-FPM] Logs from childrens may be altered","summary":"[PHP-FPM] Logs from childrens may be altered ### Summary In PHP-FPM, when configured to catch workers output through `catch_workers_output = yes` configuration, it may be possible to pollute the final log with up to 4 characters from the `FPM_STDIO_CMD_FLUSH` macro, or remove up to 4 characters from the logs. Additionally, If PHP-FPM is configured to use a syslog, it seems that much more characters can be excluded from the logs, even though it has not been tested. Note that this issue was found and reported as part of Quarkslab security audit on PHP-SRC with the OSTIF and PHP Foundation. ### Details The method `static void fpm_stdio_child_said` defined in `sapi/fpm/fpm/fpm_stdio.c` is responsible for parsing and writing the logs out from workers input. The interesting part is the following : ``` C while (1) { stdio_read: in_buf = read(fd, buf, sizeof(buf) - 1); if (in_buf <= 0) { /* no data */ if (in_buf == 0 || !PHP_IS_TRANSIENT_ERROR(errno)) { /* pipe is closed or error */ read_fail = (in_buf < 0) ? in_buf : 1; } break; } start = 0; if (cmd_pos > 0) { if ((sizeof(FPM_STDIO_CMD_FLUSH) - cmd_pos) <= in_buf && !memcmp(buf, &FPM_STDIO_CMD_FLUSH[cmd_pos], sizeof(FPM_STDIO_CMD_FLUSH) - cmd_pos)) { zlog_stream_finish(log_stream); start = cmd_pos; } else { zlog_stream_str(log_stream, &FPM_STDIO_CMD_FLUSH[0], cmd_pos); } cmd_pos = 0; } for (pos = start; pos < in_buf; pos++) { switch (buf[pos]) { case '\\n': zlog_stream_str(log_stream, buf + start, pos - start); zlog_stream_finish(log_stream); start = pos + 1; break; case '\\0': if (pos + sizeof(FPM_STDIO_CMD_FLUSH) <= in_buf) { if (!memcmp(buf + pos, FPM_STDIO_CMD_FLUSH, sizeof(FPM_STDIO_CMD_FLUSH))) { zlog_stream_str(log_stream, buf + start, pos - start); zlog_stream_finish(log_stream); start = pos + sizeof(FPM_STDIO_CMD_FLUSH); pos = start - 1; } } else if (!memcmp(buf + pos, FPM_STDIO_CMD_FLUSH, in_buf - pos)) { cmd_pos = in_buf - pos; zlog_stream_str(log_stream, buf + start, pos - start); goto stdio_read; } break; } } if (start < pos) { zlog_stream_str(log_stream, buf + start, pos - start); } } ``` For each characters of `buf`, it is checked whether it is `\\n` or `\\0`. `\\n` is used to indicate that the current line of log is terminated and can be written. `\\0` is used to detect the `FPM_STDIO_CMD_FLUSH` macro characters sequence, defined as `\\0fscf\\0` and used to flush logs. It acts the same as `\\n`. If a `\\0` character is encountered, and if the end of the buffer is reached before the full comparison with `FPM_STDIO_CMD_FLUSH` can be achieved, then the comparison is done with what is currently available: ``` C } else if (!memcmp(buf + pos, FPM_STDIO_CMD_FLUSH, in_buf - pos)) { cmd_pos = in_buf - pos; zlog_stream_str(log_stream, buf + start, pos - start); goto stdio_read; } ``` Patched: 8.1.30, 8.2.24, 8.3.12","url":"https://github.com/php/php-src/security/advisories/GHSA-865w-9rf3-2wh5","published_at":"2024-09-27T17:50:07Z","updated_at":"2024-09-27T17:50:08Z","fetched_at":"2026-11-22T14:05:37.431199Z","severity":"low","cvss_score":3.3,"epss":0.00483,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":"php","product":"php-src","vuln_id":"CVE-2024-9026","vuln_ids":["CVE-2024-8925","CVE-2024-8926","CVE-2024-8927","CVE-2024-9026","GHSA-865W-9RF3-2WH5"],"tags":["repo-advisory","CWE-117","security","repo:php/php-src","stack"],"cluster_id":11780,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/12671","html":"https://vulnwatch.ve1ve2.com/item/12671"}}]}