CVE-2025-57812: CWE-125: Out-of-bounds Read in OpenPrinting libcupsfilters
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.
AI Analysis
Technical Summary
CVE-2025-57812 is a vulnerability classified under CWE-125 (Out-of-bounds Read) and CWE-787 (Out-of-bounds Write) affecting the imagetoraster filter component within the CUPS-Filters package and its successor library libcupsfilters. CUPS is a widely used open-source printing system, and libcupsfilters provides data format conversion functions essential for printer applications. The flaw arises in the processing of TIFF image files where the pixel buffer allocation is based on the number of pixels multiplied by a pre-calculated bytes-per-pixel value. However, the processing function is called with a size calculated as the number of pixels times three bytes, leading to out-of-bounds memory access when the bytes-per-pixel value is set to one. This discrepancy allows reading or writing beyond the allocated buffer. To exploit this, an attacker must submit a print job containing a specially crafted TIFF file and specify print job options that influence the bytes-per-pixel parameter. The vulnerability exists in CUPS-Filters versions up to 1.28.17 and libcupsfilters versions from 2.0.0 up to but not including 2.1.1. The vulnerable functions are _cupsImageReadTIFF() in CUPS-Filters 1.x and _cfImageReadTIFF() in libcupsfilters 2.x, invoked through imagetoraster or cfFilterImageToRaster() respectively. The attack surface is limited to printer configurations that invoke these filters. A patch addressing this issue has been committed, but no public exploits are known. The CVSS v3.1 score is 3.7, reflecting low severity due to the attack vector requiring local network access, low privileges, and high attack complexity without user interaction, with limited confidentiality and integrity impact and no availability impact.
Potential Impact
For European organizations, this vulnerability primarily threatens the confidentiality and integrity of data processed by networked printing services using vulnerable versions of CUPS-Filters or libcupsfilters. Attackers with network access to printers can submit malicious print jobs containing crafted TIFF files to exploit the vulnerability, potentially leading to unauthorized memory reads or writes. This could result in leakage of sensitive information processed during printing or corruption of print jobs, undermining data integrity. While the vulnerability does not directly impact system availability, exploitation could be a foothold for further attacks or information gathering. Organizations with extensive printing infrastructure, especially those in sectors handling sensitive documents such as government, finance, healthcare, and legal services, are at higher risk. The low CVSS score indicates limited impact scope, but the ubiquity of CUPS in Linux-based systems and network printers in European enterprises means the exposure is non-negligible. Additionally, the lack of known exploits suggests a window of opportunity for proactive mitigation before active exploitation occurs.
Mitigation Recommendations
European organizations should immediately identify all printing systems and servers running affected versions of CUPS-Filters (<=1.28.17) or libcupsfilters (>=2.0.0 and <2.1.1). Apply the official patches or upgrade to libcupsfilters 2.1.1 or later where the vulnerability is fixed. Where patching is delayed, restrict network access to printing services to trusted hosts only and implement network segmentation to isolate printers from untrusted networks. Monitor print job logs for unusual TIFF files or abnormal print job options that could indicate exploitation attempts. Employ intrusion detection systems with signatures targeting malformed TIFF files or suspicious print job parameters. Disable or limit the use of the imagetoraster filter if not required by the printing workflow. Educate IT staff on the risks associated with print job processing vulnerabilities and ensure print servers run with the least privileges necessary. Regularly audit and update printer firmware and associated software to maintain security hygiene.
Affected Countries
Germany, France, United Kingdom, Netherlands, Italy, Spain, Sweden, Belgium, Poland, Austria
CVE-2025-57812: CWE-125: Out-of-bounds Read in OpenPrinting libcupsfilters
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.
AI-Powered Analysis
Technical Analysis
CVE-2025-57812 is a vulnerability classified under CWE-125 (Out-of-bounds Read) and CWE-787 (Out-of-bounds Write) affecting the imagetoraster filter component within the CUPS-Filters package and its successor library libcupsfilters. CUPS is a widely used open-source printing system, and libcupsfilters provides data format conversion functions essential for printer applications. The flaw arises in the processing of TIFF image files where the pixel buffer allocation is based on the number of pixels multiplied by a pre-calculated bytes-per-pixel value. However, the processing function is called with a size calculated as the number of pixels times three bytes, leading to out-of-bounds memory access when the bytes-per-pixel value is set to one. This discrepancy allows reading or writing beyond the allocated buffer. To exploit this, an attacker must submit a print job containing a specially crafted TIFF file and specify print job options that influence the bytes-per-pixel parameter. The vulnerability exists in CUPS-Filters versions up to 1.28.17 and libcupsfilters versions from 2.0.0 up to but not including 2.1.1. The vulnerable functions are _cupsImageReadTIFF() in CUPS-Filters 1.x and _cfImageReadTIFF() in libcupsfilters 2.x, invoked through imagetoraster or cfFilterImageToRaster() respectively. The attack surface is limited to printer configurations that invoke these filters. A patch addressing this issue has been committed, but no public exploits are known. The CVSS v3.1 score is 3.7, reflecting low severity due to the attack vector requiring local network access, low privileges, and high attack complexity without user interaction, with limited confidentiality and integrity impact and no availability impact.
Potential Impact
For European organizations, this vulnerability primarily threatens the confidentiality and integrity of data processed by networked printing services using vulnerable versions of CUPS-Filters or libcupsfilters. Attackers with network access to printers can submit malicious print jobs containing crafted TIFF files to exploit the vulnerability, potentially leading to unauthorized memory reads or writes. This could result in leakage of sensitive information processed during printing or corruption of print jobs, undermining data integrity. While the vulnerability does not directly impact system availability, exploitation could be a foothold for further attacks or information gathering. Organizations with extensive printing infrastructure, especially those in sectors handling sensitive documents such as government, finance, healthcare, and legal services, are at higher risk. The low CVSS score indicates limited impact scope, but the ubiquity of CUPS in Linux-based systems and network printers in European enterprises means the exposure is non-negligible. Additionally, the lack of known exploits suggests a window of opportunity for proactive mitigation before active exploitation occurs.
Mitigation Recommendations
European organizations should immediately identify all printing systems and servers running affected versions of CUPS-Filters (<=1.28.17) or libcupsfilters (>=2.0.0 and <2.1.1). Apply the official patches or upgrade to libcupsfilters 2.1.1 or later where the vulnerability is fixed. Where patching is delayed, restrict network access to printing services to trusted hosts only and implement network segmentation to isolate printers from untrusted networks. Monitor print job logs for unusual TIFF files or abnormal print job options that could indicate exploitation attempts. Employ intrusion detection systems with signatures targeting malformed TIFF files or suspicious print job parameters. Disable or limit the use of the imagetoraster filter if not required by the printing workflow. Educate IT staff on the risks associated with print job processing vulnerabilities and ensure print servers run with the least privileges necessary. Regularly audit and update printer firmware and associated software to maintain security hygiene.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2025-08-20T14:30:35.010Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6914d7b9e9dc40953bf857d9
Added to database: 11/12/2025, 6:53:45 PM
Last enriched: 11/19/2025, 7:05:21 PM
Last updated: 12/28/2025, 1:22:39 AM
Views: 96
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2025-14177: CWE-125 Out-of-bounds Read in PHP Group PHP
MediumCVE-2025-14180: CWE-476 NULL Pointer Dereference in PHP Group PHP
HighCVE-2025-14178: CWE-787 Out-of-bounds Write in PHP Group PHP
MediumCVE-2025-15109: Unrestricted Upload in jackq XCMS
MediumCVE-2025-15108: Use of Hard-coded Cryptographic Key in PandaXGO PandaX
MediumActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.