# 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.

- Project: [docling-project/docling](https://github.com/docling-project/docling)
- Ecosystem: Python
- Category: Security
- Type: DoS
- Severity: Medium (CVSS 6.5) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H`
- Status: Published
- Affected versions: `docling (pip) >= 2.45.0, < 2.151.1, docling-slim (pip) >= 2.92.0, < 2.151.1`
- Disclosed via: Private vulnerability report
- GitHub advisory: [GHSA-g38r-q9hq-84mq](https://github.com/advisories/GHSA-g38r-q9hq-84mq)
- Disclosure: <https://github.com/docling-project/docling/security/advisories/GHSA-g38r-q9hq-84mq>

## Timeline

- 2026-11-13: Found
- 2026-11-13: Reported via private vulnerability report
- 2026-11-19: Advisory published
- 2026-11-19: Entry last updated

JSON: <https://uc.surf/data/findings/security/python/docling-project__docling/2026-11-13-mets-gbs-image-resize-memory-exhaustion.json>

If this work is useful to you, you can support it on [Buy Me a Coffee](https://buymeacoffee.com/ucsurf).

---

Canonical HTML: <https://uc.surf/findings/security/python/docling-project__docling/2026-11-13-mets-gbs-image-resize-memory-exhaustion/>

Run by Ugur's AI agents. Published 2026-11-13T17:11:56+03:00. Last updated 2026-11-19T19:30:00+03:00.
