# CVE-2025-57812: [BIGSLEEP-434612419] CUPS-Filters has heap-buffer-overflow write in `cfImageLut()`

> A heap-buffer-overflow in CUPS-Filters allows attackers to execute code or cause denial of service via crafted TIFF print jobs.

- **Severity:** Low 3.7 (`CVSS:3.1/AV:A/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 12 Nov 2025
- **Updated:** 12 Nov 2025
- **Also known as:** CLSA-2026-1772638779, DEBIAN-CVE-2025-57812, GHSA-jpxg-qc2c-hgv4, UBUNTU-CVE-2025-57812

## What is CVE-2025-57812?

CVE-2025-57812 is a low-severity memory corruption vulnerability in OpenPrinting libcupsfilters, published on 12 Nov 2025. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

CUPS is a standards-based, open-source printing system, and `libcupsfilters` contains the code of the filters of the former `cups-filters` package as library functions to be used for the data format conversion tasks needed in Printer Applications. In CUPS-Filters versions up to and including 1.28.17 and libscupsfilters versions 2.0.0 through 2.1.1, CUPS-Filters's `imagetoraster` filter has an out of bounds read/write vulnerability in the processing of TIFF image files.  While the pixel buffer is allocated with the number of pixels times a pre-calculated bytes-per-pixel value, the function which processes these pixels is called with a size of the number of pixels times 3.  When suitable inputs are passed, the bytes-per-pixel value can be set to 1 and bytes outside of the buffer bounds get processed. In order to trigger the bug, an attacker must issue a print job with a crafted TIFF file, and pass appropriate print job options to control the bytes-per-pixel value of the output format. They must choose a printer configuration under which the `imagetoraster` filter or its C-function equivalent `cfFilterImageToRaster()` gets invoked. The vulnerability exists in both CUPS-Filters 1.x and the successor library libcupsfilters (CUPS-Filters 2.x). In CUPS-Filters 2.x, the vulnerable function is `_cfImageReadTIFF() in libcupsfilters`. When this function is invoked as part of `cfFilterImageToRaster()`, the caller passes a look-up-table during whose processing the out of bounds memory access happens. In CUPS-Filters 1.x, the equivalent functions are all found in the cups-filters repository, which is not split into subprojects yet, and the vulnerable code is in `_cupsImageReadTIFF()`, which is called through `cupsImageOpen()` from the `imagetoraster` tool. A patch is available in commit b69dfacec7f176281782e2f7ac44f04bf9633cfa.

Weakness: CWE-787 (Out-of-bounds Write), CWE-125 (Out-of-bounds Read)

## Which versions are affected by CVE-2025-57812?

It affects 2 products.


Products: Openprinting Cups-Filters, Openprinting Libcupsfilters.

## How do I fix CVE-2025-57812?

Apply the vendor's patch.

## Is CVE-2025-57812 being exploited?

There is no known exploitation of CVE-2025-57812 in the wild and no public exploit code.

## Other vulnerabilities in OpenPrinting libcupsfilters

- [CVE-2025-64503](https://insights.sbomify.com/CVE-2025-64503/): [BIGSLEEP-434615384] cups-filters 1.x: out of bounds write in pdftoraster (medium 4.0)
- [CVE-2025-64524](https://insights.sbomify.com/CVE-2025-64524/): CUPS rastertopclx Filter Vulnerable to Heap Buffer Overflow Leading to Potential Arbitrary Code Execution (low 3.3)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-57812 and fix it if it is affected.

What it is: CVE-2025-57812 is a low-severity memory corruption vulnerability in OpenPrinting libcupsfilters, published on 12 Nov 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-57812 in the wild and no public exploit code.

Affected product: OpenPrinting libcupsfilters. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-57812/ (Markdown: https://insights.sbomify.com/CVE-2025-57812/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-57812
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-57812
- OSV: https://osv.dev/vulnerability/CVE-2025-57812

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-57812/
Summaries are generated and may contain mistakes; the official description above is the record.
