PythonSeverity: MediumStatus: Published
METS-GBS backend resizes page images to the size declared in the OCR data without a pixel limit
The METS-GBS backend takes the page size from the hOCR page bbox and resizes the page image to that size with no upper limit (CWE-400, CWE-770). A METS-GBS archive of less than 200 KB that declares a very large page can make conversion allocate gigabytes of memory. The max_image_pixels limit added in 2.142.1 is not used by this backend, and METS-GBS is enabled in the default converter. This is a denial of service for an application that converts untrusted METS-GBS archives; confidentiality and integrity are not affected. Affected versions are docling >= 2.45.0, < 2.151.1 and docling-slim >= 2.92.0, < 2.151.1. Fixed by the maintainers in 2.151.1: the backend checks the page image size and the declared page size against max_image_pixels before it resizes, and skips a page over the limit.
Timeline
- Found
- Reported via private vulnerability report
- Advisory published
- Entry last updated
Machine-readable: JSON · Markdown · ID security/python/docling-project__docling/2026-11-13-mets-gbs-image-resize-memory-exhaustion
If this work is useful to you, you can support it on Buy Me a Coffee.