# CVE-2025-1218: Various packet overreads in mysqlnd\_writeprotocol.c

- Priority: **Routine**
- Reason: Not severe (CVSS 3.4, adjacent network); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-09-25 · Modified: 2026-09-28
- Aliases: UBUNTU-CVE-2025-1218, DEBIAN-CVE-2025-1218, ALPINE-CVE-2025-1218
- Record: https://cvemate.com/vulnerability/CVE-2025-1218 · JSON: https://cvemate.com/vulnerability/CVE-2025-1218/json

## Description

```text
The mysqlnd wire protocol parser reads fields out of server packets before checking that the packet still holds enough bytes for them. A malicious or compromised MySQL server can send a truncated packet and make the client read past the end of the packet buffer, which is undefined behaviour and can crash the process.
```

## Signals

- CVSS: 5.9 medium (v3.1, NVD) CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
- EPSS: 0.325%, percentile 27.601%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 1 (github)

## Affected

- alpine php82 (Alpine Linux): \< 8.2.35-r0
- alpine php83 (Alpine Linux): \< 8.3.36-r0 \| \< 8.3.35-r0
- alpine php84 (Alpine Linux): \< 8.4.27-r0 \| \< 8.4.26-r0
- alpine php85 (Alpine Linux): \< 8.5.12-r0 \| \< 8.5.11-r0
- debian php8.2 (Debian): \< 8.2.34-1~deb12u1
- debian php8.4 (Debian): \< 8.4.26-1~deb13u1 \| \< 8.4.26-1
- ubuntu php5 (Ubuntu): All versions (No fix recorded)
- ubuntu php7.0 (Ubuntu): All versions (No fix recorded)
- ubuntu php7.2 (Ubuntu): All versions (No fix recorded)
- ubuntu php7.4 (Ubuntu): All versions (No fix recorded) \| \< 7.4.3-4ubuntu2.29+esm4
- ubuntu php8.1 (Ubuntu): All versions (No fix recorded) \| \< 8.1.2-1ubuntu2.27
- ubuntu php8.3 (Ubuntu): All versions (No fix recorded) \| \< 8.3.6-0ubuntu0.24.04.12
- ubuntu php8.5 (Ubuntu): All versions (No fix recorded) \| \< 8.5.9-0ubuntu2 \| \< 8.5.4-0ubuntu1.4
- php group php: ≥ 8.2.\*, \< 8.2.34 \| ≥ 8.3.\*, \< 8.3.35 \| ≥ 8.4.\*, \< 8.4.26 \| ≥ 8.5.\*, \< 8.5.11
- php php: ≥ 8.2.0, \< 8.2.34 \| ≥ 8.3.0, \< 8.3.35 \| ≥ 8.4.0, \< 8.4.26 \| ≥ 8.5.0, \< 8.5.11

## References

- <https://github.com/php/php-src/security/advisories/GHSA-r6x9-5r99-36j7>
- <https://ubuntu.com/security/CVE-2025-1218>
- <https://www.cve.org/CVERecord?id=CVE-2025-1218>
- <https://github.com/php/php-src/blob/php-8.4.26/NEWS>
- <https://security-tracker.debian.org/tracker/CVE-2025-1218>
- <https://nvd.nist.gov/vuln/detail/CVE-2025-1218>
- <https://ubuntu.com/security/notices/USN-8936-1>
- <https://security.alpinelinux.org/vuln/CVE-2025-1218>

---

Data as of 2026-12-05T03:01:10.166Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
