{"vuln_id":"CVE-2024-8925","aliases":["CVE-2024-8926","CVE-2024-8927","CVE-2024-9026","GHSA-9pqp-7h25-4f32"],"description":"php8.2 - security update","published_at":"2024-09-27T17:50:21Z","modified_at":"2026-11-20T01:19:10.140574Z","first_seen_at":"2026-11-21T19:15:06.060518Z","severity":"medium","severity_source":"cvss","cvss_score":5.3,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","cwe":["CWE-1286"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":0.00927,"epss_percentile":0.61234,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2024-8925"},"matched_alias":null,"items":[{"id":491,"source":{"id":"debian-php","name":"Debian 12 php8.2 (package vulnerabilities)"},"title":"php8.2 (Debian:12): DEBIAN-CVE-2024-8925 / CVE-2024-8925 - In PHP versions 8.1.* before 8.1.30, 8.2.* before 8.2.24, 8.3.* before 8.3.12, erroneous parsing of multipart form data contained in an HTTP POST request could…","summary":"In PHP versions 8.1.* before 8.1.30, 8.2.* before 8.2.24, 8.3.* before 8.3.12, erroneous parsing of multipart form data contained in an HTTP POST request could lead to legitimate data not being processed. This could lead to malicious attacker able to control part of the submitted data being able to exclude portion of other data, potentially leading to erroneous application behavior.\n\nAffected: Debian:12:php8.2\n\nFixed in: 8.2.24-1~deb12u1\n\nReferences:\nhttps://security-tracker.debian.org/tracker/CVE-2024-8925","url":"https://osv.dev/vulnerability/DEBIAN-CVE-2024-8925","published_at":"2024-10-08T04:15:09.450000Z","updated_at":"2026-11-02T12:03:12.708043Z","fetched_at":"2026-11-21T19:15:05.963742Z","severity":"medium","cvss_score":5.3,"epss":0.00927,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":"php","product":"php8.2","vuln_id":"CVE-2024-8925","vuln_ids":["CVE-2024-8925","CVE-2024-8926","CVE-2024-8927","CVE-2024-9026","DEBIAN-CVE-2024-8925","GHSA-9PQP-7H25-4F32"],"tags":["package-watch","pkg:php8.2","fix-available"],"cluster_id":375,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/491","html":"https://vulnwatch.ve1ve2.com/item/491"}},{"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":12670,"source":{"id":"gh-php-src","name":"PHP releases (GitHub php/php-src tags)"},"title":"GHSA-9pqp-7h25-4f32 / CVE-2024-8925: Erroneous parsing of multipart form data","summary":"Erroneous parsing of multipart form data ### Summary Erroneous parsing of multipart form data contained in an HTTP POST request could lead to legitimate data not being processed thus, violating data integrity. ### Details A bug was discovered in the parsing of multipart form data contents, affecting both file and input form data. If a multipart form data payload contains a valid prefix `X` of the defined boundary `B` such that `5Kib` < `|X|` < `|B|` < `8Kib`, the logic responsible for parsing and storing the multipart payload fails to correctly extract the contents between two boundaries. This results in a violation of data integrity. The issue lies in the partial match handling in the following function: ```c // main/rfc1867.c:556 /* * Search for a string in a fixed-length byte string. * If partial is true, partial matches are allowed at the end of the buffer. * Returns NULL if not found, or a pointer to the start of the first match. */ static void *php_ap_memstr(char *haystack, int haystacklen, char *needle, int needlen, int partial) { int len = haystacklen; char *ptr = haystack; /* iterate through first character matches */ while( (ptr = memchr(ptr, needle[0], len)) ) { /* calculate length after match */ len = haystacklen - (ptr - (char *)haystack); // if (memcmp(needle, ptr, needlen < len ? needlen : len) == 0 && (partial || len >= needlen)) { // partial match here if partial != 0 break; } /* next character */ ptr++; len--; } return ptr; } ``` This is called by the following functions when the contents between two boundaries have to be extracted after parsing the MIME headers: ```c // main/rfc1867.c:580 static size_t multipart_buffer_read(multipart_buffer *self, char *buf, size_t bytes, int *end) { size_t len, max; char *bound; /* fill buffer if needed */ if (bytes > (size_t)self->bytes_in_buffer) { fill_buffer(self); } int i=0; while (self->buf_begin[i] && self->buf_begin[i] != '\\r' ) i++; /* look for a potential boundary match, only read data up to that point */ if ((bound = php_ap_memstr(self->buf_begin, self->bytes_in_buffer, self->boundary_next, self->boundary_next_len, 1))) { // partial match on max = bound - self->buf_begin; if (end && php_ap_memstr(self->buf_begin, self->bytes_in_buffer, self->boundary_next, self->boundary_next_len, 0)) { *end = 1; } } else { max = self->bytes_in_buffer; } /* maximum number of bytes we are reading */ len = max < bytes-1 ? max : bytes-1; /* if we read any data... */ if (len > 0) { /* copy the data */ memcpy(buf, self->buf_begin, len); buf[len] = 0; if (bound && len > 0 && buf[len-1] == '\\r') { buf[--len] = 0; } /* update the buffer */ self->bytes_in_buffer -= (int)len; self->buf_begin += len; } return len; } /* XXX: this is horrible memory-usage-wise, but we only expect to do this on small pieces of form data. */ static char *multipart_buffer_read_body(multipart_buffer * Patched: 8.1.30, 8.2.24, 8.3.12","url":"https://github.com/php/php-src/security/advisories/GHSA-9pqp-7h25-4f32","published_at":"2024-09-27T17:50:21Z","updated_at":"2024-09-27T17:50:21Z","fetched_at":"2026-11-22T14:05:37.431198Z","severity":"medium","cvss_score":5.3,"epss":0.00927,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":"php","product":"php-src","vuln_id":"CVE-2024-8925","vuln_ids":["CVE-2024-8925","CVE-2024-8926","CVE-2024-8927","CVE-2024-9026","GHSA-9PQP-7H25-4F32"],"tags":["repo-advisory","CWE-1286","security","repo:php/php-src","stack"],"cluster_id":11779,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/12670","html":"https://vulnwatch.ve1ve2.com/item/12670"}}]}