CVE-2025-64503 [BIGSLEEP-434615384] cups-filters 1.x: out of bounds write in pdftoraster
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- Proof of concept public · automatable: no · technical impact: partial
- Technology
- UbuntuDebianRed Hat
Description
cups-filters contains backends, filters, and other software required to get the cups printing service working on operating systems other than macos. In cups-filters prior to 1.28.18, by crafting a PDF file with a large MediaBox value, an attacker can cause CUPS-Filter 1.x’s pdftoraster tool to write beyond the bounds of an array. First, a PDF with a large MediaBox width value causes header.cupsWidth to become large. Next, the calculation of bytesPerLine = (header.cupsBitsPerPixel * header.cupsWidth + 7) / 8 overflows, resulting in a small value. Then, lineBuf is allocated with the small bytesPerLine size. Finally, convertLineChunked calls writePixel8, which attempts to write to lineBuf outside of its buffer size (out of bounds write). In libcupsfilters, the maintainers found the same bytesPerLine multiplication without overflow check, but the provided test case does not cause an overflow there, because the values are different. Commit 50d94ca0f2fa6177613c97c59791bde568631865 contains a patch, which is incorporated into cups-filters version 1.28.18.
Upgrade path
14 packages: 10 fixed, 4 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| redhat/cups-filters(Red Hat enterprise_linux 10) | All versions | No fix listed | No fix yet |
| redhat/cups-filters(Red Hat enterprise_linux 8) | All versions | No fix listed | No fix yet |
| redhat/cups-filters(Red Hat enterprise_linux 9) | All versions | No fix listed | No fix yet |
| redhat/cups-filters(Red Hat rhel_els 7) | All versions | No fix listed | No fix yet |
| debian/cups-filters(Debian 12) | < 1.28.17-3+deb12u2; = 1.28.17-3; = 1.28.17-3+deb12u1 | 1.28.17-3+deb12u2 | Fixed |
| debian/cups-filters(Debian 13) | < 1.28.17-6+deb13u1; = 1.28.17-6 | 1.28.17-6+deb13u1 | Fixed |
| debian/cups-filters(Debian 14) | < 1.28.17-7; = 1.28.17-6 | 1.28.17-7 | Fixed |
| debian/libcupsfilters(Debian 13) | < 2.0.0-3+deb13u1; = 2.0.0-3 | 2.0.0-3+deb13u1 | Fixed |
| debian/libcupsfilters(Debian 14) | < 2.1.1-2; = 2.0.0-3; = 2.1.1-1 | 2.1.1-2 | Fixed |
| OpenPrinting cups-filters | < 1.28.18; = cups-filters < 1.28.18; = libcupsfilters >= 2.0.0, < 2.1.2 | 1.28.18 | Fixed |
| OpenPrinting libcupsfilters | >= 2.0.0, < 2.1.2 | 2.1.2 | Fixed |
| redhat/cups-main(Red Hat hummingbird 1) | < 2.4.17-1.hum1 | 2.4.17-1.hum1 | Fixed |
| ubuntu/cups-filters(Ubuntu 22.04) | < 1.28.15-0ubuntu1.5 | 1.28.15-0ubuntu1.5 | Fixed |
| ubuntu/libcupsfilters(Ubuntu 24.04) | < 2.0.0-0ubuntu7.2 | 2.0.0-0ubuntu7.2 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| debian/cups-filters(Debian:12) | < 1.28.17-3+deb12u2 | 1.28.17-3+deb12u2 |
| debian/cups-filters(Debian:12) | = 1.28.17-3 | No fix listed |
| debian/cups-filters(Debian:12) | = 1.28.17-3+deb12u1 | No fix listed |
| debian/cups-filters(Debian:13) | < 1.28.17-6+deb13u1 | 1.28.17-6+deb13u1 |
| debian/cups-filters(Debian:13) | = 1.28.17-6 | No fix listed |
| debian/cups-filters(Debian:14) | < 1.28.17-7 | 1.28.17-7 |
| debian/cups-filters(Debian:14) | = 1.28.17-6 | No fix listed |
| debian/libcupsfilters(Debian:13) | < 2.0.0-3+deb13u1 | 2.0.0-3+deb13u1 |
| debian/libcupsfilters(Debian:13) | = 2.0.0-3 | No fix listed |
| debian/libcupsfilters(Debian:14) | < 2.1.1-2 | 2.1.1-2 |
| debian/libcupsfilters(Debian:14) | = 2.0.0-3 | No fix listed |
| debian/libcupsfilters(Debian:14) | = 2.1.1-1 | No fix listed |
| OpenPrinting cups-filters | = cups-filters < 1.28.18 | No fix listed |
| OpenPrinting cups-filters | = libcupsfilters >= 2.0.0, < 2.1.2 | No fix listed |
| ubuntu/cups-filters(Ubuntu:22.04) | < 1.28.15-0ubuntu1.5 | 1.28.15-0ubuntu1.5 |
| redhat/cups-main(Red Hat:hummingbird:1) | < 2.4.17-1.hum1 | 2.4.17-1.hum1 |
| redhat/cups-filters(Red Hat:enterprise_linux:10) | All versions | No fix listed |
| redhat/cups-filters(Red Hat:rhel_els:7) | All versions | No fix listed |
| redhat/cups-filters(Red Hat:enterprise_linux:8) | All versions | No fix listed |
| redhat/cups-filters(Red Hat:enterprise_linux:9) | All versions | No fix listed |
| ubuntu/libcupsfilters(Ubuntu:24.04) | < 2.0.0-0ubuntu7.2 | 2.0.0-0ubuntu7.2 |
| OpenPrinting cups-filters | < 1.28.18 | 1.28.18 |
| OpenPrinting libcupsfilters | >= 2.0.0, < 2.1.2 | 2.1.2 |
References
- Debian Security Tracker CVE-2025-64503 vendor-advisory
- https://github.com/OpenPrinting/cups-filters/security/advisories/GHSA-893j-2wr2-wrh9 exploit vendor-advisory
- https://github.com/OpenPrinting/cups-filters/commit/50d94ca0f2fa6177613c97c59791bde568631865 patch
- https://github.com/OpenPrinting/cups-filters/blob/aea8d0db017e495b0204433ebdb0e86b4871094c/filter/pdftoraster.cxx#L1620 product
- https://github.com/OpenPrinting/libcupsfilters/blob/1dd86d835b27ed149b66aee1a4853d1db8a1f44c/cupsfilters/pdftoraster.cxx#L1790 product
- www.openwall.com mailing-list third-party-advisory
- Ubuntu CVE tracker vendor-advisory
- USN-7877-1 vendor-advisory
- USN-7878-1 vendor-advisory
- www.cve.org
- Red Hat CVE page vendor-advisory
- RHSA-2026:8814 patch vendor-advisory
- Red Hat Bugzilla 2414705 issue-tracking
- nvd.nist.gov
- bugs.debian.org issue-tracking
- bugs.debian.org issue-tracking